Skip to content

Instantly share code, notes, and snippets.

@jamilnoyda
Last active May 22, 2022 08:14
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save jamilnoyda/e35ef87470ee280f4c12e94996311543 to your computer and use it in GitHub Desktop.
Save jamilnoyda/e35ef87470ee280f4c12e94996311543 to your computer and use it in GitHub Desktop.
import sys
input_list = []
count = 0
for line in sys.stdin:
input_list.append(line)
count += 1
if count == 2:
break
# y =
#
final = []
for x in input_list:
x = x.split(",")
# print(x)
# x = list(x)
x[0], x[1] = x[1], x[0]
final.append(x)
print(final)
# sys.stdout.write(str("".join(input_list)) + "\n")
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment