Skip to content

same_values() takes two lists of numbers. The function should return a list where the values were equal in lst1 and lst2.

Notifications You must be signed in to change notification settings

candytale55/same_values_Py_3

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

4 Commits
 
 
 
 

Repository files navigation

same_values_Py_3

same_values() takes two lists of numbers. The function should return a list where the values were equal in lst1 and lst2.

Description

In same_values_equal_lists.py the lists of numbers that it takes as parameter must be of equal size. The function same_values() returns a list of the INDEXES (not the values themselves) where the values were equal in lst1 and lst2. The function same_values_numbers() returns the values that matched, not the indexes.

To-do list:

  • Do a function that can take lists of unequal length.
  • Use list comprehension

Technologies

  • Python 3

Setup

NA - It's only coding examples, there's no setup.

Status

Project is: finished (technically) - but may come back and do the TO-DOs at some point.

References

Based on Codecademy's Learn Python 3 course, Code Challenges exercises

These may come in handy:

https://discuss.codecademy.com/t/how-could-i-use-list-comprehension-to-solve-this/458265

https://discuss.codecademy.com/t/how-can-i-make-this-function-work-for-lists-of-unequal-length/376643

About

same_values() takes two lists of numbers. The function should return a list where the values were equal in lst1 and lst2.

Topics

Resources

Stars

Watchers

Forks

Languages