Python String(85mn)
Python String(85mn)
៊ី វ
មុខវិជ្ជា ៖ រ័ត្៌មាជវិទ្យា
ថ្នាកថទ្យ៊ី ៖ 10NGS-C1
បរព្រនជរោយ ៖ រ ះ លកខិណ
- អាចកំណត់បានពកា
ី របង្កត
ី ន្
ិ ង្ប្ី បាស់ Python String
- អាចង្វកា
ី រ modify strings
- អាចង្វកា
ី រ slicing string
ៀ នឭករមរៀនជចាសថ
- ងតី int ន្
ិ float មានលកខណៈដូចគ្នា ន្
ិ ខុសគ្នាអ្វខ
ី ះល ?
▪ Introduce to string
▪ String Creation
▪ Accessing character
▪ String Slicing
▪ Deleting String
▪ String modify
▪ Concatenating and Repeating
▪ Format String
Introduce to String
▪ A string is a sequence of characters.
▪ Characters can include letters, numbers,
symbols, and whitespace.
▪ Strings are immutable,
▪ Strings enclosed within either single
quotes (' '), double quotes (" "), or triple
quotes (''' ''' or """ """).
String Creation
A) string = 'Hello’
B) string = "Hello“
C) Both A and B
D) Neither A nor B
ហវក
ឹ ហាត់២
A) H
B) e
C) !
D) l
ហវក
ឹ ហាត់៣
A) strip()
B) trim()
C) remove()
D) delete()
ហវក
ឹ ហាត់៤
A) replace()
B) switch()
C) substitute()
D) change()
ហវក
ឹ ហាត់៦
A) f”Hello {name}“
B) f’Hello {name}’
C) f”””Hello {name}”””
D) All answers are correct
ហវក
ឹ ហាត់៧