String question
Fredrik Lundh
effbot at telia.com
Wed Feb 16 15:43:21 EST 2000
More information about the Python-list mailing list
Wed Feb 16 15:43:21 EST 2000
- Previous message (by thread): String question
- Next message (by thread): String question
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]
Runar Olsen <runaro at stud.cs.uit.no> wrote: > I want the variable 'string' to be a string and not a list.. it's not a list, it's a tuple > >>> n =10 > >>> string = "n = ", n > >>> print string > ('n = ', 10) > > I want string to be "n = 10". How? string = "n = " + str(n) or string = "n = %d" % n or (see section 7 in the tutorial for more on string formatting). </F>
- Previous message (by thread): String question
- Next message (by thread): String question
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]
More information about the Python-list mailing list