Wednesday, October 5, 2022

Reverse a String in Python without using any built-in Functions

 metin = """This text will be reversed without using any built-in functions"""

ters_metin = ""
i = 0
y = []
a = [0]
for x in metin:
i = i+1
a[0] = i
y = y + a

for z in y:
ters_metin = ters_metin + metin[-z]
print(metin)
print(ters_metin)

No comments: