Write a Python Program to Find the First Repeated Character in a Given String

preview_player
Показать описание
Hello Programmers, Welcome to my channel.

In this video you will learn about how to Write a Python Program to Find the First Repeated Character in a Given String

Python Scripts
======================

Python Functions Solved
==========================

Python Programs Solved
============================

Code
=============================
my_string = input("Enter a string : ")

for index, letter1 in enumerate(my_string):
for letter2 in my_string[index+1:]:
if letter1 == letter2:
print("First Repeated Character is : ", letter1)
exit(0)
else:
print("String does not have repeated characters")

Keywords
=============================
#python #python3 #python_assignment #pythonprogramming #pythontutorial #pythonprojects #pythoncourse #pythonbaba #pythonforbeginners #pythonautomation #pythonbasic #pythonbeginners
Рекомендации по теме
Комментарии
Автор

i try with the same code with google ( input ) but the out i am getting [ g and o ] as an output..its giving all repeated char in the string.

terryterry
welcome to shbcf.ru