Python/C3/Manipulating-strings/Tamil

From Script | Spoken-Tutorial
Jump to: navigation, search
Timing Narration
0:00 Hi! 'manipulating strings' குறித்த tutorial க்கு நல்வரவு!
0:04 இந்த டுடோரியலின் முடிவில் செய்ய முடிவது
  1. strings ஐ Slice செய்வ்வது மற்றும் அவற்றிலிருந்து sub-strings ஐ பெறுவது.
  2. strings ஐ Reverse செய்வது.
  3. strings இல் characters ஐ மற்றுவது.
  4. strings ஐ upper அல்லது lower case க்கு Convert செய்வது.
  5. ஒரு list of strings ஐ சேர்ப்பது.
0:19 இந்த tutorial ஐ ஆரம்பிக்கும் முன், பின் வரும் டுடோரியல்களை முடிக்கவும். "getting started with strings", "getting started with lists" மற்றும் "basic datatypes and operators".
0:31 ipython interpreter ஐ invoke செய்வோம்.
0:34 command prompt இல் type செய்க: ipython
0:39 ஒரு எளிய problem ஐ பார்க்கலாம்... எப்படி strings ஐ slice செய்வது.. . மற்றும் sub-strings ஐ பெறுவது .
0:47 variable week இல் வாரத்தின் நாட்கள் அடங்கிய list இருப்பதாக கொள்வோம்.
0:52 week is equalto within square brackets in double quotes sunday sun பின் comma mon monday க்கு, பின் tuesday ஆகவே tue, பின் wednesday thursday, friday மற்றும் saturday
1:15 ஒரு எளிய problem ஐ பார்க்கலாம்.
1:18 ஒரு string s கொடுக்கப்பட்டது. இந்த string செல்லுபடியாகும் ஒரு நாளின் பெயரா இல்லையா என பார்க்க வேண்டும்.
1:29 string ஐ saturday என define செய்வோம்.
1:32 type செய்க: in double quotes saturday
1:36 s is equal to saturday
1:41 s எந்த மாதிரியும் இருக்கலாம்.
1:47 அதாவது sat saturday, பின் s captial a t ; பின் capital s saturday ; பின் sat centre letter in capital பின் whole saturday in capital letters
2:05 இப்போதைக்கு problem ஐ, small sat மற்றும் small saturday form களுக்கு மட்டுமே ஸால்வ் செய்வோம்.
2:16 நாம் form களுக்கு, tutorial இன் கடைசியில் செய்வோம்.
2:24 கொடுத்த string இன் முதல் 3 characters variable week இல் இருக்கிறதா என சோதிக்க வேண்டும்.
2:32 எந்தsequence data-type களையும் போல strings களை sub-string களாக slice செய்ய முடியும்.
2:38 s இன் ... முதல் மூன்று characters பெற சொல்வது...
2:41 s in closing brackets, square brackets 0 colon 3 பின் என்டர் செய்க.
2:49 கவனிக்க, நாம் string ஐ index 0 இலிருந்து index 3 வரை slice செய்யும்போது , 3 சேர்க்கப்படவில்லை.
2:55 நமக்கு ஏற்கெனெவே தெரியும், string இன் கடைசி element ஐaccess செய்ய s within brackets -1. ஐ பயன்படுத்தலாம்.
3:02 video வை நிறுத்தி பயிற்சியை முடித்த பின் தொடரவும்.
3:09 string s இலிருந்து Obtain the sub-string excluding the first and last characters
3:16 solution க்கு terminal க்கு போகலாம்.
3:18 type செய்க: s in square brackets 1 colon -1 பின் என்டர் செய்க
3:30 நாம் s இன் substring ஐ பெறுகிறோம், முதல் மற்றும் கடைசி characters இல்லாமல்.
3:37 இப்போது variable week இல் குறிப்பிட்ட substring இருக்கிறதா என சோதிக்க வேண்டும்.
3:41 நாம் 'sat' க்கு சோதிப்போம்.
3:46 type செய்க: s in square brackets colon 3 பின் என்டர் செய்க.
3:52 பின் s colon 3 in week
4:09 நமக்கு கிடைக்கும் விடை true.
4:11 இப்போது, கொடுக்கப்பட்ட string …. palindromic ஆ இல்லையா என்னும் problem ஐ பார்க்கலாம்.
4:19 முதலில்... palindromic string என்பது... முன் பின்னாக எழுதினாலும்... மாறாமல் அப்படியே இருக்கும் ஒரு string.
4:26 இந்த string ஐ பார்க்கலாம் malayalam.
4:31 ஆகவே s1 is equal to malayalam
4:35 malayalam double quotes இல் இருக்க வேண்டும்.
4:40 இப்போது, இந்த string ஐ … இதன் reverse உடன் ...ஒப்பிட வேண்டும்.
4:45 மீண்டும், நாம் பயன்படுத்துவது எல்லா sequence data-types க்கும் பொதுவான technique, அதாவது within brackets colon colon -1.
4:55 நாம் s இன் reverse ஐ … s1 மற்றும் … within square brackets colon colon -1 … பின் என்டர் செய்து பெறுகிறோம்.
5:06 இப்போது, string s palindromic ஆ என சோதிக்க, சொல்வது s1 is equal to is equal to s1 in square brackets colon colon -1
5:24 எதிர்பார்த்தது போல கிடைப்பது True.
5:27 இப்போது, கொடுத்த string கேபிடல் எம் Malayalam என இருந்து லோயர் கேஸ் எம் malayalam இல்லை என்பதால் மேற்கண்ட சோதனைக்கு False என விடை கிடைக்கும்.
5:36 நாம் சோதிக்கும் முன் string ஐ முழுதும் lower case அல்லது முழுதும் upper case ஆக convert செய்ய வேண்டும்.
5:43 இதை செய்ய Python சில method களை தருகிறது. அவை s dot lower மற்றும் s dot upper .
5:48 சோதிக்கலாம்.
5:51 type செய்க: s1 is equal to malayalam in double quotes ; இங்கு m capital
6:04 பின் s1 dot upper பின் closing brackets
6:11 பின் s1 output ஐ தரும்.
6:14 okay. நீங்கள் பார்ப்பது போல, s மாறவில்லை.
6:18 ஏனென்றால், upper ஒரு புதிய string ஐ திருப்புகிறது.
6:20 original string ஐ அது மாற்றவில்லை.
6:23 அதே போல, type செய்க: s1 dot lower closing brackets
6:33 பின் s1 dot lower closing brackets is equal to is equal to
6:40 s1 dot lower closing brackets within square bracket colon colon -1
6:51 video வை நிறுத்தி பயிற்சியை முடித்த பின் தொடரவும்.
6:57 s என்பது செல்லுபடியாகும் வாரநாள் பெயரா என சோதிக்கவும்.
7:02 problem இன் தீர்வை SAT, SATURDAY, Saturday மற்றும் Sat. போன்ற form களையும் சேர்க்கும் படி மாற்றவும்.
7:19 solution க்கு terminal க்கு போகலாம்
7:22 type செய்க: s in week. பின் s dot lower closing bracket
7:33 பின் in square brackets colon 3
7:37 பின் in week
7:43 பார்ப்பது போல, இப்போது s இன் presence ஐ week இல் எந்த format இலும் -- capitalized, அல்லது all caps, full name அல்லது short form – சோதிக்கலாம்.
7:56 எந்த input string ஐயும் lower case க்கு convert செய்துவிடலாம். பின் அது list week இல் இருக்கிறதா என சோதிக்கலாம்.
8:03 இன்னொரு problem பார்க்கலாம்.
8:05 அடிக்கடி e-mail id களை பார்க்கிறோம். அவற்றில் '@' மற்றும் periodகள் text ஆல் மாற்றப்பட்டு இருக்கும். இது போல info[at]fossee[dot]in.
8:26 இப்போது சரியான e-mail address களை பெற விரும்புகிறோம்.
8:30 variable email இல் email address இருப்பதாக கொள்வோம்.
8:34 type செய்க: email is equal to
8:38 within quotes double quotes info in square brackets at பின் fossee பின் மீண்டும் square bracket foss பின் dot பின் in.
8:48 இப்போது, முதலில் [at]@ ஆல் replace செய்கிறோம். இதற்கு பயனாவது replace method of strings.
8:57 type செய்க: email is equal to email.replace
9:05 பின் in brackets double quotes @ at square brackets comma பின் மீண்டும் in square bracket
9:14 இப்போது, type செய்க: print email output கிடைக்கிறது.
9:22 video வை நிறுத்தி பயிற்சியை முடித்த பின் தொடரவும்.
9:30 Replace the [dot] with . in email
9:38 solution க்கு terminal க்கு போகலாம்.
9:43 type செய்க: email is equal to email.replace within brackets in double quotes dot square brackets
10:02 பின் மீண்டும் in double quotes a dot.
10:07 சுவாரசியமான இன்னொரு ப்ராப்ளம். நம்மிடம் list of e-mail addresses இருக்கிறது. நமக்கு ஒரு நீளமான comma க்களால் அல்லது semi-colon களால் பிரித்த e-mail addresses string தேவை.
10:23 type செய்க: email underscore list
10:30 is equal to within square brackets double quotes info at the rate fossee dot in, enquiries at the rate fossee dot in, பின் மீண்டும் comma in double quotes help at the rate fossee dot in
10:42 இப்போது, ஒவ்வொரு email id யும் comma க்களால் பிரிந்த ஒரு நீளமான string வேண்டும். பயன்படுத்துவது join operation:
 email_str is equal to in double quotes comma
dot join பின் in brackets email underscore list
11:13 பின் என்டர் செய்க.
11:15 பின் output க்கு print email underscore str .
11:22 type செய்க: print email underscore str
11:28 இப்போது, ஒரு comma ... பின் ஒரு space ஆல் … email id கள் சேர்க்கப்பட்டு விட்டன.
11:34 video வை நிறுத்தி பயிற்சியை முடித்த பின் தொடரவும்.
11:41 நாம் உருவாக்கிய email underscore str க்கு separator ஐ comma வுக்கு பதிலாக semicolon என மாற்றவும்.
11:51 தீர்வுக்கு டெர்மினலுக்கு மாறுவோம்.
11:56 type செய்க: email underscore str is equal to email underscore str dot replace பின் in brackets in double quotes comma பின் in another double quotes semicolon.
12:14 பின் type செய்க: print email underscore str.
12:26 ஒரு semicolon … பின் ஒரு space ஆல் ... email id கள் சேர்க்கப்பட்டு விட்டன.
12:32 இத்துடன் இந்த டுடோரியல் முடிகிறது.
12:35 இந்த டுடோரியலில் கற்றவை, sub-strings ஐ பெறுதல் மற்றும் index numbers ஐ பயன்படுத்தி reverse of string ஐ பெறுதல்.
12:41 2. பின் வரும் functions ஐ பயன்படுத்துதல் - - upper() -- ஒரு string ஐ upper case இல் பெற; - lower() -- t ஒரு string ஐ lower case இல் பெற; - replace() -- ஒரு character ஐ இன்னொன்றால் மாற்ற; - join() -- tஒரு operator ஆல் list of strings ஐ மாற்ற.
12:57 தீர்வு காண self assessment கேள்விகள்
13:01 1. கொடுத்த string s = "this is a string", அதை எப்படி "this isn't a list" என மாற்றுவது?
13:09 s இல் கொடுத்த string "F.R.I.E.N.D.S" , "friends" என ஒரு string பெறுக. s இல் friends எல்லாம் capital letter களில் புள்ளிகளால் பிரிக்கப்பட்டு இருக்கிறது.
13:26 விடைகள் இதோ
13:28 1. இதற்கு நாம் replace function ஐ பயன்படுத்தலாம்.
13:31 type செய்க: s = s dot replace within brackets மற்றும் double quotes string, மீண்டும் brackets மற்றும் double quotes list.
13:40 பின் s = s dot replace within brackets மற்றும் double quotes is, மீண்டும் brackets மற்றும் double quotes isn't
13:51 கவனித்தால் statement இல் வரும் ஒவ்வொரு 'is' உம் isn't ஆல் மாற்றப்படுகிறது.
13:59 2. string ஐ lower caseக்கு மாற்ற, பயன்படுத்துவது lower() method
14:05 type செய்க: s in square brackets colon colon 2 dot lower closing brackets.
14:13 இந்த tutorial ஐ ரசித்திருப்பீர்கள் மற்றும் பயனுள்ளதாக இருக்கும் என நம்புகிறோம்.
14:16 நன்றி!

Contributors and Content Editors

Priyacst