I am out of trial and error again Lists
Seymore4Head at Hotmail.invalid
Sat Oct 25 02:37:21 CEST 2014
On Sat, 25 Oct 2014 01:20:53 +0100, MRAB <python at mrabarnett.plus.com>
>On 2014-10-25 00:57, Seymore4Head wrote:
>> Wait! I don't get it.
>> print (name)
>> print (b)
>> I forgot the b
>If you print the int 1, you'll see:
>If you print the string "1", you'll see:
>Normally you want it to print only the characters of the string. Think
>how annoying it would be if every time you printed a string it appeared
> >>> print("Hello world!")
>How could you print just the text:
>No, it's better that it prints the characters of the string.
>One function you can use is repr:
>x = 1
>y = "1"
>This will print:
>OK, now it's clear that x is an int and y is a string.
x = 123
y = "123"
z = [1,2,3]
[1, 2, 3]
More information about the Python-list