Posts

Showing posts from July, 2023

No Fluff Guide to Python - P10 - Project1 - Text Truncate Mobile App

Image
  Throughout our Python learning journey, we've delved into the intricacies of loops, explored the versatility of lists, unpacked the structure of tuples, unraveled the depths of dictionaries, and navigated the intricacies of functions. Now, it's time to embark on an exciting adventure where we'll put all these concepts to the test by tackling a real-life challenge. We'll dive into a practical scenario that showcases the power of Python and demonstrates how these fundamental building blocks come together to solve complex problems. Get ready to witness the magic of Python as we transform abstract concepts into tangible solutions. Challenge - Project 01: In the realm of modern app design, the text truncate feature has emerged as a ubiquitous technique to optimize the user experience across devices with varying screen sizes. This clever approach dynamically adjusts the length of text displayed on the screen, ensuring that essential information is conveyed concisely and leg...

No Fluff Guide to Python - P9 - String & Regex

Image
  String compare print ( 'abc' == 'abc' ) # True print ( 'abc' == 'xyz' ) # False This operation is case-sensitive print ( 'abc' == 'ABC' ) # False print ( 'abc' != 'xyz' ) # True print ( 'abc' != 'abc' ) # False Partial match: in , not in in operator, which determines if one string contains another string print ( 'bbb' in 'aaa-bbb-ccc' ) # True print ( 'xxx' in 'aaa-bbb-ccc' ) # False print ( 'abc' in 'aaa-bbb-ccc' ) # False print ( 'xxx' not in 'aaa-bbb-ccc' ) # True print ( 'bbb' not in 'aaa-bbb-ccc' ) # False the in and not in operators test membership in lists, tuples, dictionaries, and so on print( 1 in [ 0 , 1 , 2 ]) # True print( 100 in [ 0 , 1 , 2 ]) # False in tuple , set , and range print( 1 in ( 0 , 1 , 2 )) # True print( 1 in { 0 , 1 , 2 }) # True print( 1 in range( 3...