lakshitha
-
Posts
11 -
Joined
-
Last visited
Content Type
Profiles
Forums
Events
Posts posted by lakshitha
-
-
Did you put a password for root account? Otherwise don't use any password for access.
-
passwd must be password !
-
-
>>> x = float(2.8) >>> type(x) <class 'float'> >>> x = 2.8 >>> type(x) <class 'float'>
Both answers are correct !
-
def sortList(myList): myList.sort() evens = [] odds = [] for i in myList: if (i % 2) == 0: evens.append(i) else: odds.append(i) print(evens + odds) numbers = [5, 7, 2, 6, 1, 3, 44, 14, 9] sortList(numbers)
-
Use pyinstaller !
more : https://www.pyinstaller.org/
-
You have to use web scraping modules like BeautifulSoup for do this job.
import urllib2 from bs4 import BeautifulSoup url = "www.example.com" html = urllib2.urlopen(url) soup = BeautifulSoup(html) img_src = soup.find('div', {'class':'captcha-image'})['style'] #Hereafter, you can select the base64 encoded string.
-
Exactly, You used an unexpected character after \ (backslash) in your python file.
Please, can you publish your code here? If you are , I can give the best solution.
-
- Make sure what you already installed those package via Pip
- Find out .py files of those modules and place them in directory of your .py file
- Reinstall Python in your PC
-
Hi Lara,
If you want to print illegal something in Python, you should use escape character.
>>> print("I am using \" illegal \" something.") I am using " illegal " something.
else if you want to print two backslashes (\\) in string, you must use r before string.
>>> print(r"This will insert two \\ (backslashes)") This will insert two \\ (backslashes)
MYSQL.CONNECTOR ISSUE
in Python
Posted
Try to connect again adding "port" argument like this,
Otherwise,
Go to localhost sever using browser and make sure about that password is correct. Or make a new account (with password or without) and try to execute your queries via command line with database.