how to create an array in python
array = ["1st", "2nd", "3rd"]
#prints: ['1st', '2nd', '3rd']
array.append("4th")
#prints: ['1st', '2nd', '3rd', '4th']
how to create an array in python
array = ["1st", "2nd", "3rd"]
#prints: ['1st', '2nd', '3rd']
array.append("4th")
#prints: ['1st', '2nd', '3rd', '4th']
python print array
#Setting The Array:#
array = [250,630,221] #You can have as many items as you want#
#Printing The Whole Array:#
print(array)
#output = [250, 630, 221,]#
#Printing Individual Items From The Array:#
print(array[0])
#output = 250#
print(array[1])
#output = 630#
print(array[2])
#output = 221#
#array[0] is the 1st array item, array[1] the 2nd, and so on#
#Printing Multiple Items From The Array:#
print(array[2],array[0])
#output = 221#
Copyright © 2021 Codeinu
Forgot your account's password or having trouble logging into your Account? Don't worry, we'll help you to get back your account. Enter your email address and we'll send you a recovery link to reset your password. If you are experiencing problems resetting your password contact us