questions/python/page/64
The choice of the optimizer has a ...READ MORE
s = " ".join(myList) #here " " ...READ MORE
Convert both the strings to either uppercase ...READ MORE
Assuming that your file unique.txt just contains ...READ MORE
When you do set() you are creating an empty ...READ MORE
‘’’ This is the way to Enter multi ...READ MORE
You could use a dictionary: def f(x): ...READ MORE
Let me illustrate this with an example ...READ MORE
file = open('text.txt', 'w+) READ MORE
Use the sort function mylist.sort() READ MORE
for c in "string": ...READ MORE
Look carefully at your output: 5wlfgALGbXOahekxSs9wlfgALGbXOahekxSs5 ^ ...READ MORE
You can find factorial by many ways. ...READ MORE
It's a function annotation. In more detail, Python 2.x ...READ MORE
You can use the date module to ...READ MORE
Try this ''' This is a multiline comment. I can ...READ MORE
import time time.sleep(10) READ MORE
I'm not sure if this is your ...READ MORE
You probably want to use np.ravel_multi_index: [code] import numpy ...READ MORE
import datetime print(datetime.datetime.fromtimestamp(int("1284101485")).strftime('%Y-%m-%d %H:%M:%S')) That is the cleanest way ...READ MORE
To install Django, you can simply open ...READ MORE
Unfortunately, the "engine" behind the scenes is ...READ MORE
for item in my_list[::-1]: ...READ MORE
950down voteaccepted It's because any iterable can be ...READ MORE
inv_dict = {value: key for key, value ...READ MORE
Python has no unary operators. So use ...READ MORE
'==' checks for the equality of the ...READ MORE
Hey, there are various libraries used in ...READ MORE
Here is the code for this - list(set((list_of_numbers) For ...READ MORE
You can use '\n' for a next ...READ MORE
raw_input fuction is no longer available in ...READ MORE
Python 3.x: class MyClass(object): = new-style class class MyClass: ...READ MORE
shutil has many methods you can use. One ...READ MORE
import itertools for item in itertools.chain(listone, listtwo): #li ...READ MORE
Use the remove() function: >>> p = [1, ...READ MORE
import json data=json.loads(employee_data) print(data) READ MORE
setup.py tells you that the module or the ...READ MORE
Use docstrings for multi-line commenting - """ Line 1 Line ...READ MORE
Slicing is basically extracting particular set of ...READ MORE
Try the strip() function: s = s.strip() If you ...READ MORE
The fastest way to reverse string is ...READ MORE
Both the conventions for enclosing strings are ...READ MORE
Use the quit() function. This function can ...READ MORE
You can do this using a dictionary: dict((i, ...READ MORE
You have to use the zip function ...READ MORE
Use pop(): mapping.pop("key_x") #key_x is a key entry Note ...READ MORE
Use the type() function with the variable ...READ MORE
It is best to install pip in ...READ MORE
>>> s = '1123' >>> print s.zfill(8) #desired ...READ MORE
num = input("enter number") print(num) READ MORE
OR
At least 1 upper-case and 1 lower-case letter
Minimum 8 characters and Maximum 50 characters
Already have an account? Sign in.