Python Code Samples



Filters


Ramya
While loop example in python
Ramya | 5 years, 10 months
i = 0
while (i < 3):     
    i = i+1
python
Ramya
Infinite While loop example in python
Ramya | 5 years, 10 months
i = 0
while (i < 3):     
    if(i==2):
python
get binary code for an integer in python
kishore_kumar | 5 years, 9 months
n = 115

b_n = bin(n)
python binary
How to do web scrapping from a website for getting keywords
sonia shaik | 5 years, 10 months
from bs4 import BeautifulSoup
from bs4.element import Comment
from urllib.request import Request, 
python web scrapping nltk
Python pickle load
Reshma | 5 years, 5 months
import pickle

# open a file,where we stored the pickle data
python load pickle
Custom Exception writing in python
kishore_kumar | 5 years, 9 months
class MinLengthError(Exception):
    def __init__(self, message, errors):
        super().__init__
Enter a word: hello hello is valid Enter a word: one Required min length: 4 {'inpt': 'on
python exception
connect to redis and get values using python
kishore_kumar | 5 years, 5 months
import redis # pip install redis
r = redis.Redis(host='localhost', port='6379')

python redis
Ramya
Python program to print pattern
Ramya | 5 years, 9 months
for i in range (6,1,-1):
	for j in range (i):
		print ("*",end= "")
python pattern
How to write python dictionary to csv file with header
kishore_kumar | 5 years, 9 months
improt csv

data = [
python csv
how to use format function extensively with strings in python
harika | 6 years, 2 months
a = 5
b = 10
c = 15
python
Prev Next