I want to print a string in uppercase and backwards
 string = raw_input ("Favor ingrese su cadena-> ")
    print string.upper()
this one prints only in uppercase


I want to print it backwards


Recommended Answers

All 2 Replies

[::-1] or reversed()

>>> s = 'hello' 
>>> s[::-1].upper()
>>> ''.join(reversed(s.upper()))
s = "Hello"
y = ""

for i in range(len(s) - 1, 0, -1):

y = y.upper()
Be a part of the DaniWeb community

We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.