Coming soon - Get a detailed view of why an account is flagged as spam!
view details

This post has been de-listed

It is no longer included in search results and normal feeds (front page, hot posts, subreddit posts, etc). It remains visible only via the author's post history.

1
Program that outputs text via another program that the first one codes for.
Post Body

I was just trying to come up with ideas of programs I could write, as I learn python. And then I thought would it be possible to write a program, that takes input from the user, and then writes that into a .py file as code.

If we were to run that .py file, we should get the output we put in like how the print("Hello World")
works.

Any ideas as to how this could be written?

Edit: I am still learning, so please explain like I know nothing but basic print code and a couple math operations :)

Author
Account Strength
100%
Account Age
5 years
Verified Email
Yes
Verified Flair
No
Total Karma
48,331
Link Karma
30,261
Comment Karma
16,680
Profile updated: 2 days ago
Posts updated: 4 months ago

Subreddit

Post Details

We try to extract some basic information from the post title. This is not always successful or accurate, please use your best judgement and compare these values to the post title and body for confirmation.
Posted
3 years ago