Write a Python Program to Lowercase The First n Characters in a String

Опубликовано: 17 Июль 2023
на канале: Code With TJ
179
2

Hello Programmers, Welcome to my channel.

In this video you will learn about how to Write a Python Program to Lowercase The First n Characters in a String

Python Scripts
======================
https://codewithtj.blogspot.com/2024/...

Python Functions Solved
==========================
https://codewithtj.blogspot.com/2023/...

Python Programs Solved
============================
https://codewithtj.blogspot.com/2023/...


Code
=============================
input_string = input("Enter a String : ")
n = int(input("Enter Value of n : "))
output_string = ""

for index, letter in enumerate(input_string):
if index less_than_symbol n:
output_string += letter.lower()
else:
output_string += letter

print("Modified string is ...")
print(output_string)



Keywords
=============================
#python #python3 #python_assignment #pythonprogramming #pythontutorial #pythonprojects #pythoncourse #pythonbaba #pythonforbeginners #pythonautomation #pythonbasic #pythonbeginners