Python Program to Reverse the List - In Hindi

preview_player
Показать описание
Python Program to Reverse the List - In Hindi - Tutorial#75

In this video I have explained how to reverse a List. You have to accept a list from the user and then you have to reverse the original list itself. In this program, I haven't used any built in function but have used the logic (user logic) to perform the task.

Tags Used:

python list programming exercise
reverse the list
python program to reverse the list
python
python reverse list
list reverse python
python reversed
python reverse array
python reverse order of list
python reverse for loop
python how to reverse a list
reverse list recursive python
python 3
reverse list
reverse list in python
reverse list python

#codeitup
#List
#python
Рекомендации по теме
Комментарии
Автор

Osm bro... Mujhe online koi aisa nhi mila jisne mujhe itna acha smjhaya...

anjalikaushik
Автор

a=[ ]
size=int(input("Enter size of the list"))
for i in range(0, size):
val=int(input("Enter number"))
a.append(val)
print("Earlier=", a)
a.reverse()
print("Reversed =", a)

udayan.
Автор

sir today finally aaj ye program samajh aa hi gaya sir .Thank u so much sir

yashnadar
Автор

sir ye list ke collective question apke btaye hue predefined functions ki help se bhut easily ho jare hai. for ex esme a.reverse se bhi humko list ka revarsal part mil jayega

riyajoshi
Автор

Hi anand,
Your videos are very good i am able to get clarity on these topics, can you please have a look for this program that is it also okay for the reverse python list :
a = [1, 2, 3, 4, 5]
b =[]
for i in range(1, len(a)+1):
b.append(a[-i])

tanishnarang
Автор

Sir we can reverse list by this way also:--
a=[]
size=int(input("Enter size of list:"))
for i in range(size):
x=input("Enter Item to add in the list:")
a.append(x)
print("Original list is :", a)
a.reverse()
print("List after reverse:")
for i in range(size):
print(a[i])

pankajlega
Автор

a[]
Size=int(input("enter size of the list"))
For I in range(Size):
Val=int(input("enter no:")
a.append(Val)
a.reverse()
Print("after reversing the will be", a)

suvohalder
Автор

# THE EASIEST WAY TO DO IT:
(1 LINE OF CODE)
#wap to find reverse a list
a = [ ]
num = int(input("How many items do you want in your list?"))
for i in range(num):
x = int(input("Write your number here:"))
a.append(x)
print("The reversed list will be:", a[::-1])

suryanshusaxena
Автор

a = []
size = int(input('enter the size of your list'))
for i in range(size):
x = int( input('enter num'))
a.append(x)
print('Original list =', a)
b =[]
for i in range(len(a)-1, -1, -1):
b.append(a[i])
print(b)

is my code correct sir

Ansh_Rajpoot_
Автор

Sir I have problems in my school practicals can you help me

suryadyutibanerjee
Автор

Sir can u tell me this code is right or wrong
a=[]
size=int(input("enter the size of list"))
for i in range(size):
x=int(input("enter the value"))
a.append(x)
a.reverse()
print(a)

akashkanojiya
Автор

Sir python sikhne ke liye html css Ana chahiye kya??

shubhamraj
Автор

Sir please upload "oop function".

sohanbiswas
Автор

a=[]
n=int(input("enter the no of elements in the list"))
for i in range(n):
x=int(input("enter the elements of the list"))
a.append(x)
print("the original list is", a)
b=a
print(b)
j=n-1
for i in range(n):
a[i]=b[j]
j=j-1
print("the reverse list is ", a)

why this is not returning the reverse of a list
whats the error in this

manishsatyal
Автор

Sir agar me reverse predefined function use karke e program solve karunga right hoga??

sohanbiswas
Автор

Sir is this program same as this one- Given a list, reverse all the nodes in the list. The first node becomes the last and the last
becomes the first, and so on?

manvigupta
Автор

# program to reverse the list itself
a=[]
size=int(input("enter the size of list"))
for i in range(size):
val=int(input("enter number to add in list a "))
a.append(val)
print("before reverse the list", a)
a.reverse()
print("after reverse the list=", a)

# sir isse bhi likh sakte hai kya sir

loudlaughinglife
Автор

sir please make video on python matrix code(*, -, + )

populartotkay
Автор

sir can we can't use the list.reverse=() funtion to reverse the list.

prashantchoudhary
Автор

sir why u didnt use predefined list function

catscradle
join shbcf.ru