У нас вы можете посмотреть бесплатно Python String Methods, F-Strings & Escape Seq| [DAY - 6] - Python Basic to Advanced (AI/ML) in Hindi или скачать в максимальном доступном качестве, видео которое было загружено на ютуб. Для загрузки выберите вариант из формы ниже:
Если кнопки скачивания не
загрузились
НАЖМИТЕ ЗДЕСЬ или обновите страницу
Если возникают проблемы со скачиванием видео, пожалуйста напишите в поддержку по адресу внизу
страницы.
Спасибо за использование сервиса ClipSaver.ru
In today’s Python lesson, we go deeper into strings — the stuff you’ll actually use in real programs.
What you’ll learn in this video:
Replacing text in a string using replace()
Splitting strings into lists with split()
String concatenation and why it sometimes fails
The right way to combine text and numbers
F-Strings (clean, powerful, modern Python)
Formatting numbers using modifiers (:.1f)
Understanding escape sequences:
new line
\t tab space
\\ backslash
\r carriage return
Real-world example: live progress output using sys.stdout
If you’re still joining strings like it’s 2010, this lesson is your upgrade.
F-strings = cleaner code, fewer bugs, less headache.
==== HOMEWORK DAY - 6 ====
1. Replace Like a Pro
Given:
text = "I love Python"
Replace "Python" with "Coding"
Print both original and modified strings
2. Split & Count
Given:
sentence = "Python makes programming easy"
Split the sentence into a list
Print the list
Print how many words are there
(Hint: len() still works, just saying.)
3. Safe Concatenation
Create:
name = "Karan"
age = 25
Do NOT use commas in print().
Make it work using:
string concatenation with casting
then again using f-string
If it errors first time, good. That’s learning.
4. F-String Flex
Create variables:
product = "Laptop"
price = 55000
Print:
The price of Laptop is 55000 rupees
Only f-string allowed. No cheating.
5. Format Like an Adult
Given:
value = 100 / 7
Print it:
with 1 decimal
with 2 decimals
Precision matters. Math kids will thank you later.
6. Escape Sequence Test
Print the following output exactly:
Hello World
Python is fun!
Path: C:\Users\Python
hint: Use
, \t, and \\ properly.
7. Mini Project: Progress Bar
Create a loop that prints:
Loading: 0%
Loading: 1%
...
Loading: 100%
Same line updating using \r.
If they pull this off, they’re officially dangerous.
If your code works on first try, you probably copied.
If it broke once and you fixed it—you’re learning.
_______________________________________
Send the homework directly in my email:
[email protected]
and inform the name in comment
_____________
#PythonInHindi
#PythonBasics
#LearnPython
#ProgrammingInHindi