Universe Sandbox

General Category => Everything Else => Topic started by: vh on June 09, 2012, 03:15:59 AM

Title: How Many
Post by: vh on June 09, 2012, 03:15:59 AM
How many poo poo

def poo(number):
    print 'i like %s poo' %(number)
poo(5)
Title: Re: How Many
Post by: atomic7732 on June 09, 2012, 03:23:33 AM
Output:

i like 5 poo

Python <3

But, wait, do you put the parentheses around "number" after %? I don't think that's needed. Only if you have multiple arguments.

hi = "pony "
print hi + "should " + hi * 2
Title: Re: How Many
Post by: Desacabose on June 09, 2012, 03:42:19 AM
How many poo poo

def poo(number):
    print 'i like %s poo' %(number)
poo(5)
Title: Re: How Many
Post by: vh on June 09, 2012, 03:43:34 AM
print 'pony'*2000