+ 3

[ASSIGNMENT] Python3

Python script which prints its own source code 👍

3rd Apr 2018, 5:26 PM
Sonny
Sonny - avatar
5 Answers
+ 7
Sonny Please review the headers used as well as other details within the thread below. Thanks. https://www.sololearn.com/discuss/1108024/?ref=app
4th Apr 2018, 1:54 AM
Fox
Fox - avatar
3rd Apr 2018, 5:39 PM
Emma
+ 3
You should also propose this as an assignment in the lesson factory ! my python (without open (__file__)): https://code.sololearn.com/cXvZvLT3iLzC/#py
4th Apr 2018, 9:23 PM
CĂ©pagrave
CĂ©pagrave - avatar
+ 2
One-liner: with open(__file__) as f: print(f.read())
8th Apr 2018, 10:55 PM
Nevfy
+ 1
Does that only happen in the Code Playground? Or in other Python environments as well?
3rd Apr 2018, 5:57 PM
Emma