How do I stop aList from flowing into sumIs? I've tried a couple of line breaks after aList's to close it. A break in aList stops the for loop and still flows into the sumIs.
code:
aList = ['spam', 'eggs', 'ham']
for x in aList:
print(x, end = ' ')
sumIs = 0
for number in [1, 2, 3, 4]:
sumIs = sumIs + number
print(sumIs)
prod = 1
for item in [1, 2, 3, 4]:
prod *= item
print(prod)
S = 'lumberjack'
T = ("and", "I'm", "okay")
for char in S:
print(char, end=' ')
print as of now is:
spam eggs ham 10
24
l u m b e r j a c k
print should be:
spam eggs ham
10
24
l u m b e r j a c k