programming-examples/python/Function/Python function to create and print a list where the values are square of numbers between 1 and 30 (both included).py

7 lines
138 B
Python
Raw Normal View History

2019-11-15 12:59:38 +01:00
def printValues():
l = list()
for i in range(1,21):
l.append(i**2)
print(l)
printValues()