Skip to content

Latest commit

 

History

History
27 lines (17 loc) · 484 Bytes

File metadata and controls

27 lines (17 loc) · 484 Bytes

022 list and tuple

📝 Instructions:

  1. Write a function list_tuple() which accepts a sequence of comma-separated numbers in a string as parameter and generate a list or a tuple which contains every number.

Example input:

list_tuple(34,67,55,33,12,98)

Example output:

['34', '67', '55', '33', '12', '98']

or

('34', '67', '55', '33', '12', '98')

💡 Hints:

  • tuple() method may be used to convert the list into a tuple