Hi Guys,
I am new to Python and programming and just started a Python tutorial - currently about string methods.
The drill is the following:
Print the string variable capitalizing only the first letter, to turn "the TIME is Noon." into "The TIME is Noon."
What I did is this:
=> The time is noon. - what's OK according to Python capitalize() definition
What I need is this:
=> "The TIME is Noon"
The thing is that I have to follow the tutorial curriculum and for now - at its beginning - I am limited to string methods, concatenation, printing and should not reach beyond.
Searched the Net for solutions - found nothing.
Any suggestions as to any other methods (or solutions within the above framework) most welcome.
May be as simple as 1,2,3... but I am stuck
Thanks!
(Spyder 3.6/Win8.1Pro/32bit)
I am new to Python and programming and just started a Python tutorial - currently about string methods.
The drill is the following:
Print the string variable capitalizing only the first letter, to turn "the TIME is Noon." into "The TIME is Noon."
What I did is this:
txt = "the TIME is Noon." print(txt.capitalize())What I get is this:
=> The time is noon. - what's OK according to Python capitalize() definition
What I need is this:
=> "The TIME is Noon"
The thing is that I have to follow the tutorial curriculum and for now - at its beginning - I am limited to string methods, concatenation, printing and should not reach beyond.
Searched the Net for solutions - found nothing.
Any suggestions as to any other methods (or solutions within the above framework) most welcome.
May be as simple as 1,2,3... but I am stuck

Thanks!
(Spyder 3.6/Win8.1Pro/32bit)