Sunday 20 October 2019

Python 3 Example Code

Hi Guys !!!
After a long time am back in Blooger. I have to share a lot in Android Framework (Generic/Multimedia) along with new changes in Android O, P and Q.
   A lot changes is added in Android App side and framework side  from developer point of view.

I will planning to share soon some topic.

Today I am going to share my Python endeavour .  I have created some ready to use Python 3 example code, Some Gold Tricks of python standard Libs and some common mistake.
All example code file is given below
https://github.com/Saurabh-12/Python_Learning

Some Example code, most of them, you find from above links
# 1. Python way of value swaping
a,b = 5,10
print(a,b)
a,b = b,a
print(a,b)

# 2. Create a single String for the list
my_string_list = ["Python""is""awesome"]
print(" ".join(my_string_list))

# 3. Reverse the String using slicing
singeString = " ".join(my_string_list)
print(singeString[::-1])

# 4. Find The Most Frequent Value In A List.
number_list = [1,2,3,1,2,3,2,2,4,5,1,2]
print(max(set(number_list), key =number_list.count))

from collections import Counter
cnt = Counter(number_list)
print(cnt.most_common(3))

#5. Checking two word Anagrams Listen = Silent.
s1 = "listen" # tringle
s2 = "silent" # integral
print("Words are Anagrams" if Counter(s1) == Counter(s2) else "No")

# 6. Chained Comparison
b = 6
print(4<b<8)
print(1==b<20)

.... and so on... Please check my GitHub Page ( https://github.com/Saurabh-12)for more.
I will back soon with some  famous chnages in Android O and P from framework perspective.

Thanks
Saurabh 
Happy Coding !!!!


1 comment:

  1. thanks for wonderful post...

    Some of the best Mobile App Development Company In Phoenix Arizona find the way to help their clients to reach to the wide range of consumers using the smartphones and so many corporates attribute their success to the mobile app development. In today's time, users want everything faster, easily customizable and accessible and the mobile app development companies deliver them with prominent promises.

    ReplyDelete

Build a Custom Kernel Module for Android

Hi Guys!!!Hope you are doing well !!!. Today I will describe how you can write a custom kernel module(Hello world) for Android and load it a...