diff --git a/python code b/python code new file mode 100644 index 0000000..101d741 --- /dev/null +++ b/python code @@ -0,0 +1,26 @@ + +# Python program to demonstrate +# Creation of List + +# Creating a List +List = [] +print("Blank List: ") +print(List) + +# Creating a List of numbers +List = [10, 20, 14] +print("\nList of numbers: ") +print(List) + +# Creating a List of strings and accessing +# using index +List = ["Geeks", "For", "Geeks"] +print("\nList Items: ") +print(List[0]) +print(List[2]) + +# Creating a Multi-Dimensional List +# (By Nesting a list inside a List) +List = [['Geeks', 'For'] , ['Geeks']] +print("\nMulti-Dimensional List: ") +print(List)