Lesson 17 of 34

List Methods: சேர், நீக்கு, வரிசைப்படுத்து

9 min 25 XP

append() கடைசியில் சேர்க்கும், insert() குறிப்பிட்ட இடத்தில் சேர்க்கும், remove() ஒரு மதிப்பை நீக்கும், pop() கடைசி மதிப்பை எடுத்துக் கொடுக்கும்.

Example: edit me and press Run

Output Loading Python (first time takes a few seconds)
Press Run to see the result here.

எண்கள் உள்ள list-க்கு sum(), max(), min() மிகவும் பயனுள்ளவை. sort() சிறியதிலிருந்து பெரியதாக வரிசைப்படுத்தும்; sort(reverse=True) தலைகீழாக.

Example: edit me and press Run

Output Loading Python (first time takes a few seconds)
Press Run to see the result here.

ஒரே வரியில் space விட்டு பல எண்களைப் பெற: input().split() ஒரு list தரும்; ஒவ்வொன்றையும் int ஆக்க வேண்டும்.

Example: edit me and press Run

Output Loading Python (first time takes a few seconds)
Press Run to see the result here.

Challenge

+25 XP

ஒரு வரியில் space விட்டு எண்கள் வரும் (Input பெட்டியைப் பாருங்கள்). அவற்றில் பெரியது மற்றும் சிறியதின் வித்தியாசத்தை (max - min) print செய்யுங்கள்.

Output Loading Python (first time takes a few seconds)
Press Run to see the result here.