Computer >> บทช่วยสอนคอมพิวเตอร์ >  >> การเขียนโปรแกรม >> Python

วิธีหา Max Alphabetical Character จาก String ใน Python

ใช้ built-in max() บนสตริง

ตัวอย่าง

>> max('helloworld')
'w'
>>> max('stripedzebra')
'z'

เปรียบเทียบตาม Unicode code point