Python Interview Questions and Answers | Logical Questions in Python | Printing Duplicates in List

preview_player
Показать описание
Python Interview Questions and Answers | Logical Questions in Python | Printing Duplicates in List
This video is part of python tutorial for beginners in hindi.In this video,i have explained Python Program to reverse words present in string.
you will learn:-
1) Python Interview Questions and Answers
2) Logical Questions in Python

source code :-

About Python Tutorial:- python for beginners-Go from Zero to Hero in python.This tutorial includes python programming videos from basics to advanced

More tutorials:-

About codeyug :-
Codeyug provides tutorials for building your programming skills.Here,you will learn various programming languages,computer science,web development with free of cost.

SHARE | SUBSCRIBE | LIKE
-- - - - - - - - - - - - - - - - - -Thanks for watching this video - - - - - - - - - - - - - - - - - -- -
Our social links:-
creator:-
$ -shantanu kejkar -$

#python #python3 #programming #codeyug #tutorial #beginners #coding
Рекомендации по теме
Комментарии
Автор

Thanks for your explanation. Following one more possible solution.

l=["hello", 10, 20, 10, "hello", 10, 20, 30, 40, 10, 20]

uniq_elements=[]
duplicate_elements=[]

for item in l:
if item not in uniq_elements:
uniq_elements.append(item)
else:


print(duplicate_elements)

beniciocardoso
Автор

list(set([el for el in l if l.count(el)>1]))

hamzaghannem
Автор

My solution:
x=['hello', 10, 20, 40, 20, 60, 40, 50, 20]
y=[]
for i in x:
if x.count(i)>1:
y.append(i)
print(list(set(y)))

dwaipayansaha
Автор

Other possible solution :
Li = [33, 44, 33, 66, 77, 88, 99, 33]
Du = {Li[i]:i for i in range(len(Li)) if Li[i] in (Li[0:i-1]+Li[i+1:-1])}
print(Du.keys())

badrenanna
Автор

Keep making videos like these...I'm know c and python basics but don't know how to implement that ..I mean idk how to find out logics of any questions..😢..plz give me a suggestion sirr.

manofsteel
Автор

Using Set should not be allowed since it uses algo under the hood.

thebeastsclips
Автор

Can u explain anything bnkng projects or fraud detection or loan projects or retail projects kindly explain

rajm
Автор

KBC ka program kese karenge? Iss par koi video hai kya?

bazzelrahman
Автор

print(list(set(filter(lambda x: [1, 2, 3, 4, 4, 5, 6, 6].count(x) > 1, li))))

Oxygen_abc
Автор

Sir aur questions ki video banao isi se related. Isme thoda confusion hai

bazzelrahman
Автор

Bhai logic Building par ek video banao please that how to built a logic please please please bohot zarourat he mujhe please 😥😭🙏🙏🙏🙏🙏🙏🙏🙏🙏🙏🙏🙏🙏

sourabhmori
Автор

excuse me, sir, how about not duplicating? this video only shows if there are duplicates in the list, what if the list doesn't have duplicate elements?

Nuraini-znkr
Автор

what is meaning -> in python like
L1 = [1, 2, 3, 4, ["python", "java", "c++", (10, 20, 30)], 5, 6, 7, ["apple", "banana", "orange"]]
Print following
orange->e
what is solution

bensecretoftheomnitrix
Автор

thanks bro instested of list d we set can also be used no repetation

krushnakantkalaskar
Автор

Mujhe samjh nahi aya kis tarikese condition lagaya gaya he

akashgupta
Автор

little bit problem about second method i and j

sayanchakraborty
Автор

Thoda sa samjh aaya hai.. please dubara smjha do.

sushmitasingh