Python 3.0 string question

JTsyo

Lifer
Nov 18, 2007
11,909
1,039
126
How do you caps a string now? It used to be string.upper now all I see are string.ascii_uppercase and capwords, neither does what upper did. My old line used to be:
string.upper(raw_input('enter word: '))

Think I also need to change from raw_input to just input.
 

JasonCoder

Golden Member
Feb 23, 2005
1,893
1
81
So on a tangential note, how are you liking the new 3.0? Did they break compat with a lot? For someone brand new to Python will it matter?

Thx.
 

Ken g6

Programming Moderator, Elite Member
Moderator
Dec 11, 1999
16,472
4,323
75
Python 3.0 seems best for people new to Python. Among the changes:

- Removing arcane print incantations. A trailing comma on a print used to suppress a newline; now there's a keyword argument.
- Many things that used to return lists now return iterators, or "views". There is no xrange; range now returns an iterator.
- Removing "redundant" keywords. There is no longer a "long"; int smoothly transitions from 32 bits to unlimited bits.

Here's most of the changes.