Python Forum
a funny coding challege
Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
a funny coding challege
#3
that's not running itself, it's running a command string.  "itself" means the file, not a command string, and not some other file.  running itself is to run the script file.  if i run the script under python3 then it should run itself under python2, and while running under python2, print "hello", then run itself under python3, and while running under python3, print "world", then do nothing more.  if i run the script under python2 then it should run itself under python3, and while running under python3, print "hello", then run itself under python2, and while running under python2, print "world", then do nothing more.
Tradition is peer pressure from dead people

What do you call someone who speaks three languages? Trilingual. Two languages? Bilingual. One language? American.
Reply


Messages In This Thread
a funny coding challege - by Skaperen - Dec-06-2017, 09:23 AM
RE: a funny coding challege - by DeaD_EyE - Dec-06-2017, 11:44 AM
RE: a funny coding challege - by Skaperen - Dec-07-2017, 02:26 AM

Possibly Related Threads…
Thread Author Replies Views Last Post
  a funny code nzcan 0 2,129 Oct-31-2018, 08:51 PM
Last Post: nzcan
  Funny English Kebap 41 24,390 Feb-10-2018, 02:06 AM
Last Post: Skaperen
  Funny things Java Devs do but Python Devs Don't QueenSvetlana 1 3,294 Nov-02-2017, 08:45 PM
Last Post: nilamo

Forum Jump:

User Panel Messages

Announcements
Announcement #1 8/1/2020
Announcement #2 8/2/2020
Announcement #3 8/6/2020