len(s)

Python एक बिल्ट-इन फ़ंक्शन भी प्रदान करता है जो एक स्ट्रिंग (या किसी अन्य कंटेनर जिसका हम कोर्स के आगे कवर करेंगे) की लंबाई प्राप्त करने में मदद करता है। हम len() का उपयोग करके एक स्ट्रिंग की लंबाई प्राप्त कर सकते हैं:

a = 'some random string'
print(len(a))

यह प्रोग्राम 18 प्रिंट करेगा।

चुनौती

दो स्ट्रिंग्स दी गई हैं, पहले लाइन में छोटी स्ट्रिंग प्रिंट करें और दूसरी लाइन में लंबी स्ट्रिंग प्रिंट करें।

Input

Output

short one
a very long text here

short one
a very long text here

AAABBB
AB

AB
AAABBB

BB
AA

BB
AA

Constraints

Time limit: 3 seconds

Memory limit: 512 MB

Output limit: 1 MB

To check your solution you need to sign in
Sign in to continue