Created
June 7, 2022 19:57
-
-
Save tjhartline/216eb96abe1e51ac00f6498ad82ccb67 to your computer and use it in GitHub Desktop.
Lists in Python
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
user_input = input() | |
hourly_temperature = user_input.split() | |
hour_temp = len(hourly_temperature) | |
#create an empty list | |
temps = [] | |
if hour_temp >= 0: | |
for i in hourly_temperature: #question on i and appends i | |
temps.append(i) | |
temps.append('->') | |
hour_temp -= 1 | |
continue | |
temps.pop() | |
for s in temps: #question here | |
print(s,'', end='') | |
continue | |
print('') |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment