Python Code Samples



Filters


json string to python dictionary using json module
kishore_kumar | 6 years, 4 months
import json

my_str = '{"1": 4, "4": 2, "5":3 }'
python json
sandeep
Python Script to create AWS beanstalk
sandeep | 6 years, 9 months
#!/usr/bin/python
  
import boto
python aws beanstalk
Ramya
Difference between normal def defined function and lambda function in Python
Ramya | 5 years, 8 months
li = [4,65,65,23,86,343,75,3,7,5,87,34,56,64,90] 
final_list = list(filter(lambda x: (x%2 == 0) , l
lambda python
Ramya
PYTHON: AWS IAM password reset
Ramya | 5 years, 1 month
import boto3
client = boto3.client('iam')
UserName=input("Enter UserName:")
boto3 python
Get current environment variables in python
kishore_kumar | 6 years, 9 months
import os
env = os.environ

python python-os
gaya38
Shuffle list elements in python
gaya38 | 6 years, 6 months
import random;
z = [1,90,4,2]
z = random.shuffle(z)
python
Use map function in python
kishore_kumar | 6 years, 7 months
def get_double(num):
    return num * 2

python
find all numbers in a string using python regular expression
kishore_kumar | 5 years, 8 months
import re

inp_st = "This 1 line has 100 number, 34 and 90s two"
re python string
gaya38
Python sample codes for beginners
gaya38 | 6 years, 7 months
print "Welcome to python"
Basic python programs available in below links which will covers most of the examples of Level 1 pyt
python
gaya38
Python program for prime number check
gaya38 | 6 years, 6 months
a=input("Enter a value:")
k=0
b=(a/2)+1
python
Prev Next