Given a string containing uppercase characters (A-Z), compress the string using Run Length encoding. Repetition of character has to be replaced by storing the length of that run. Write a python function that performs the run-length encoding for a given string and returns the run-length encoded String. Provide different String values and test your Program.
Sample Input Expected Output
AAAABBBBCCCCCCCC 4A4B8C
AABCCA 2A1B2C1A
Watch the full Python tutorial series in Hindi here:
• Python Tutorial in Hindi
Watch Programming Practice questions complete playlist:
• Programming Practice using Python
Watch complete functions playlist:
• Function in Python
Python Tutorial in English:
• #0 Python Tutorial for Beginners | Course ...
👉 Subscribe for more Python tips and tutorials!
📱 Connect with me on social media!
📸 Instagram: Follow me on Instagram for behind-the-scenes content, coding inspiration, and more.
/ codewithdaneyal
💼 LinkedIn: Connect on LinkedIn to stay in touch and expand your professional network.
/ mohd-daneyal-hasan-lari-282539105
🐙 GitHub: Check out my GitHub for all the code examples, projects, and repositories from my tutorials.
https://github.com/mohddaneyal
🎓 Facebook: Join my Facebook group for discussions, Q&A, and community support on all things Python!
/ daneyallari
📧 Email: For business inquiries, reach me at
[email protected]
[email protected]
Please like, comment, share and subscribe.
#CodeWithDaneyal #python #pythonprogramming #pythoninhindi #pythontutorial #pythonforbeginners