Print a List :

firstlist = ["bike", "car", "Bus"]        # Creating a list of vehicles
print(firstlist)                          # Printing the list

Output :

['bike', 'car', 'Bus']

Length of a List :

firstlist = ["bike", "car", "Bus"]        # Re-creating the same list
print(len(firstlist))                     # Printing number of items

Output :

3

Different Data Types in Lists :

list1 = ["bike", "car", "Bus"]            # List of strings
list2 = [1, 5, 7, 9, 3]                   # List of integers
list3 = [True, False, False]              # List of booleans

Output :

["bike", "car", "Bus"]
[1, 5, 7, 9, 3]
[True, False, False]

Mixed Data Types in a List :

list1 = ["abc", 34 ,True, 40 ,"male"]     # Mixed data: string, int, boolean

Output :

["abc", 34, True, 40, "male"]

Check Data Type of List :

mylist = ["apple", "banana", "cherry"]    # Creating a fruit list
print(type(mylist))                       # Printing the type (should be list)

Output :

<class 'list'>