Python: Making a List

Post Reply
User avatar
Jason
Site Admin
Posts: 973
Joined: Sun Dec 21, 2025 8:56 pm
Contact:

Code: Select all

# Lists are ordered, changeable, and can contain duplicates.

a_few_flower_types = ["dandelion", "sunflower", "rose"]

a_silly_list_with_3_data_types = ["camel", 1, 5.7]

# Below is another way to make a list.

a_few_flower_types = list(("dandelion", "sunflower", "rose"))
 

POSTREACT(ions) SUMMARY

Post Reply