Skip to content

Instantly share code, notes, and snippets.

@codecakes
Forked from nfx/input.py
Created March 12, 2024 16:44
Show Gist options
  • Save codecakes/d4c66a997d80b01810e5fbb6d20100ef to your computer and use it in GitHub Desktop.
Save codecakes/d4c66a997d80b01810e5fbb6d20100ef to your computer and use it in GitHub Desktop.
x = [1,2,3]
if len(x) < 3:
return x
else:
return [4,5,6]
import json
x = [1,2,3]
if len(x) < 3:
print(json.dumps(x))
else:
print(json.dumps([4,5,6]))
@codecakes
Copy link
Author

codecakes commented Mar 12, 2024

It is imp to attack the hard challenge as early and learn the concept behind. Now I understand a few things about ast which generally I have not come across!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment