Skip to content

Instantly share code, notes, and snippets.

@tjhartline
Created June 7, 2022 19:57
Show Gist options
  • Save tjhartline/216eb96abe1e51ac00f6498ad82ccb67 to your computer and use it in GitHub Desktop.
Save tjhartline/216eb96abe1e51ac00f6498ad82ccb67 to your computer and use it in GitHub Desktop.
Lists in Python
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