Python | Reverse a list | Lower case to Upper

Reverse a list:

a=[1,9,7,3,8,6]     #list
a.reverse()
print(a)            #reverse list

Output :

[6,8,3,7,9,1] 

 

Lower case to Upper:

lines = [] 
while True:
    var = str(input())
    if var:
       lines.append(var.upper())
    else :
       break;
for i in  lines:
       print(i)

 

Output:

hello world
HELLO WORLD 

Comments

Popular posts from this blog

Print Fibonacci Series using Recursion | C program :

TOP 10 PROGRAMMING LANGAUAGES COMMING 2021 | ARTICLE