Skip to content

Day 2 Question 9 #127

@Jugnupapa

Description

@Jugnupapa

in this program every second string is being saved and every odd string is skipped.

Solution:
change while input(): to while True: and it will be solved like below:

Why do every second line is storing in the list and all odd lines are skipped?

lst = []

while True:
x = input()
if len(x) != 0:
lst.append(x.upper())
else:
break

print(lst)
for line in lst:
print(line)

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions