0

Hello guys how can I make my integer after multiplying my string to print it in new different lines

Thanks

14th Jul 2016, 11:01 AM
hacker charlo
hacker charlo - avatar
6 Réponses
+ 2
the plus sign is used to add new line character at the end of the string.
14th Jul 2016, 8:16 PM
RedAnt
RedAnt - avatar
0
if i understood correctly, you want to multiply your string and make every copy in the new line. if that is the case: string = "pumpkin" print((string + "\n")*3) this way you are multiplying your string and the end of the line which will make a multiline string.
14th Jul 2016, 1:17 PM
RedAnt
RedAnt - avatar
0
Thanks RedAnt why the + sign
14th Jul 2016, 5:02 PM
hacker charlo
hacker charlo - avatar
0
Okaaay now I get you we add \n just like a string but it will function the way its supposed to cool.
14th Jul 2016, 5:37 PM
hacker charlo
hacker charlo - avatar
0
Ooh sure seems you good at python
14th Jul 2016, 8:28 PM
hacker charlo
hacker charlo - avatar
0
Dude where are you from being a hacker doesn't mean am fluent with every programming language and this is not a place where you use bad language this is like a classroom you understand??
19th Jul 2016, 7:17 AM
hacker charlo
hacker charlo - avatar