Python Forum
Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
print twice?????
#4
The code in the book you linked is correct, but it is also python2.

If you are using python3 it would look like this:
>>> def print_twice(bruce):
...     print(bruce, bruce)
...
>>> print_twice("spam")
spam spam
>>> print_twice(8887)
8887 8887
>>>
Reply


Messages In This Thread
print twice????? - by raulseangarciaroberts - Dec-25-2017, 03:59 PM
RE: print twice????? - by stranac - Dec-25-2017, 04:08 PM
RE: print twice????? - by raulseangarciaroberts - Dec-27-2017, 12:53 AM
RE: print twice????? - by Mekire - Dec-27-2017, 01:23 AM

Forum Jump:

User Panel Messages

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