Latest questions in Python

0 votes
1 answer

What is the use of "assert" in Python?

The statement assert exists in almost every programming ...READ MORE

Feb 7, 2022 in Python by Nandini
• 5,480 points
366 views
0 votes
1 answer

How can I count the occurrences of a list item?

For Counting the occurrences there are many ...READ MORE

Feb 7, 2022 in Python by Nandini
• 5,480 points
294 views
0 votes
1 answer

python: Syntax Error: EOL while scanning string literal

There are many ways to deal with ...READ MORE

Feb 5, 2022 in Python by Dev
• 6,000 points
1,069 views
0 votes
0 answers

testing test test

This is the most active category where ...READ MORE

Feb 4, 2022 in Python by anonymous
• 300 points
231 views
0 votes
1 answer

Understanding slice notation

To answer your question let me explain ...READ MORE

Feb 4, 2022 in Python by Nandini
• 5,480 points
721 views
0 votes
1 answer

Is there a label/goto in Python?

Since Python is a structured programming language, ...READ MORE

Feb 4, 2022 in Python by Nandini
• 5,480 points
381 views
0 votes
1 answer

Base language of Python

Python is written in C, not completely ...READ MORE

Feb 3, 2022 in Python by Dev
• 6,000 points
487 views
0 votes
2 answers

What's the difference between %s and %d in Python string formatting?

The reason is that they are using ...READ MORE

Feb 8, 2022 in Python by Rahul
• 9,670 points
20,332 views
0 votes
0 answers

TypeError: 'list' object is not callable in python

I am a beginner in Python, created ...READ MORE

Feb 3, 2022 in Python by Nandini
• 5,480 points
774 views
0 votes
0 answers

MQTT Subscribe

Hello, this is my code where i ...READ MORE

Dec 9, 2021 in Python by Shri
• 120 points
455 views
0 votes
0 answers

Write a Splitted PDF Back to HDFS using Python Insecure Client

I have used the PdfFileReader to read ...READ MORE

Nov 25, 2021 in Python by Kannan
• 120 points
432 views
0 votes
0 answers

Complete the function diff, do not modify the rest.

def diff(a,b):     # end function print(" *** ...READ MORE

Nov 22, 2021 in Python by anonymous
• 120 points
270 views
0 votes
0 answers
0 votes
0 answers

AttributeError: 'str' object has no attribute 'click'

Hey guys. i need help! I have ...READ MORE

Nov 8, 2021 in Python by anonymous
• 120 points
3,177 views
0 votes
0 answers

NameError: name 'Solution' is not defined ret = Solution().singleNumber(param_1) Line 30 in _driver (Solution.py) _driver() Line 41 in <module> (Solution.py)

def singleNumber(self, nums: List[int]) -> int:         nums_dict = ...READ MORE

Oct 22, 2021 in Python by anonymous
• 120 points
1,842 views
0 votes
0 answers

Help, How can I fix this? TypeError: Getting error as __init__() got an unexpected keyword argument 'rotaion_range'.

datagen = ImageDataGenerator(zoom_range=0.2,rotaion_range=10,width_shift_range=0.1, height_shift_range=0.1,horizontal_flip=True, vertical_flip = False ...READ MORE

Oct 20, 2021 in Python by anonymous
• 120 points
341 views
0 votes
0 answers

DevOps Engineer which language prefir for better

why python language is most used language ...READ MORE

Oct 19, 2021 in Python by anonymous
• 120 points
362 views
0 votes
0 answers

what is wrong here?print ('We have logged in as{0.user}'.format(client))

I need to ask where I got ...READ MORE

Oct 17, 2021 in Python by anonymous
• 120 points
235 views
0 votes
0 answers

Touch event action using marionette_driver

HI, I am using marionette_driver to automate firefox ...READ MORE

Oct 13, 2021 in Python by anonymous
• 120 points
220 views
0 votes
0 answers

Why do i get this error in tkinter - Python?

This is my code: from tkinter import * root ...READ MORE

Oct 10, 2021 in Python by LogizTV
• 120 points
513 views
0 votes
0 answers

ModuleNotFoundError: No module named 'pyQt5'

from pyQt5.QtWidgets import * def window(): ...READ MORE

Oct 8, 2021 in Python by anonymous
• 120 points
903 views
0 votes
0 answers

i'm not able to install numpy,time packges in phy charm

Oct 8, 2021 in Python by Sampath
• 120 points
310 views
0 votes
0 answers

Class Type in Python

I know that type() function is used ...READ MORE

Oct 7, 2021 in Python by Brijesh
• 120 points
359 views
0 votes
0 answers

Please help me to install speech recognition in VS code

I got this type of error ERROR: Could ...READ MORE

Oct 4, 2021 in Python by Edureka
• 120 points
1,051 views
0 votes
0 answers

IndentationError: expected an indented block in phyton

Hi I i keep getting that error ...READ MORE

Sep 30, 2021 in Python by anonymous
• 120 points
218 views
0 votes
0 answers

error install mysqlclient on windows

i have that error (dont find answer) ...READ MORE

Feb 7, 2021 in Python by anonymous
• 120 points
1,518 views
0 votes
0 answers

Dickey-Fuller test in Python

Dear all, I'm trying to reproduce one of ...READ MORE

Feb 5, 2021 in Python by Marcelo
• 120 points
659 views
0 votes
1 answer

How to declare an array in Python?

variable = [] Now variable refers to an empty list*. Of ...READ MORE

Jan 5, 2021 in Python by Gitika
• 65,910 points
1,072 views
0 votes
1 answer

How to change the “tick frequency” on x or y axis in matplotlib?

You could explicitly set where you want ...READ MORE

Jan 5, 2021 in Python by Gitika
• 65,910 points
17,230 views
0 votes
1 answer

How to prompt for user input and read command-line arguments?

To read user input you can try the cmd module for ...READ MORE

Jan 5, 2021 in Python by Gitika
• 65,910 points
1,708 views
0 votes
1 answer

Creating an empty Pandas DataFrame, then filling it?

Here's a couple of suggestions: Use date_range for the index: import ...READ MORE

Jan 5, 2021 in Python by Gitika
• 65,910 points
1,825 views
0 votes
1 answer

How to set value for particular cell in pandas DataFrame using index?

Why df.xs('C')['x']=10 does not work: df.xs('C') by default, returns a new ...READ MORE

Jan 5, 2021 in Python by Gitika
• 65,910 points
3,205 views
0 votes
1 answer

Remove final character from string

Simple: st = "abcdefghij" st = st[:-1] There is ...READ MORE

Jan 5, 2021 in Python by Gitika
• 65,910 points
410 views
0 votes
1 answer

How to combine two columns of text in pandas dataframe?

If both columns are strings, you can ...READ MORE

Jan 5, 2021 in Python by Gitika
• 65,910 points
1,693 views
0 votes
1 answer

How to get the position of a character in Python?

There are two string methods for this, find() and index(). ...READ MORE

Jan 5, 2021 in Python by Gitika
• 65,910 points
801 views
0 votes
1 answer

How to Remove specific characters from a string in Python?

Strings in Python are immutable (can't be changed). Because ...READ MORE

Jan 5, 2021 in Python by Gitika
• 65,910 points
689 views
0 votes
1 answer

How to install pip with Python 3?

If you're running Python 2.7.9+ or Python ...READ MORE

Jan 5, 2021 in Python by Gitika
• 65,910 points
1,215 views
0 votes
1 answer

Call a function from another file?

There isn't any need to add file.py while importing. ...READ MORE

Jan 5, 2021 in Python by Gitika
• 65,910 points
960 views
0 votes
1 answer

SELENIUM ERROR !!HELP!!

Hi, @There, A possibility is that the element ...READ MORE

Jan 5, 2021 in Python by Gitika
• 65,910 points
1,351 views
0 votes
3 answers

How to split a string into a list?

Using For loop This approach uses for loop ...READ MORE

Jan 4, 2021 in Python by David Samon
719 views
0 votes
3 answers

How do I use raw_input in Python 3?

raw_input() was renamed to input() in Python 3. Another example ...READ MORE

Jan 4, 2021 in Python by Carlos
2,777 views
0 votes
1 answer

Is it possible to break a long line to multiple lines in Python?

Example of implicit line continuation: a = some_function( ...READ MORE

Jan 4, 2021 in Python by Gitika
• 65,910 points
1,020 views
0 votes
3 answers

How to add a new item to a dictionary in Python?

There is no add() , append() , or insert() method ...READ MORE

Jan 4, 2021 in Python by Reshma
590 views
0 votes
3 answers

TypeError: 'module' object is not callable

Solve By Calling with Module Name Another solution to the TypeError: 'module' object ...READ MORE

Jan 4, 2021 in Python by Carlos
34,662 views
0 votes
2 answers

How do I set the figure title and axes labels font size in Matplotlib?

Setting the font size of the figure ...READ MORE

Jan 4, 2021 in Python by Nikita
7,837 views
0 votes
2 answers

How to change the font size on a matplotlib plot?

Functions dealing with text like label, title, etc. accept ...READ MORE

Jan 4, 2021 in Python by Carlos
3,820 views
0 votes
2 answers

How do I make python wait for a pressed key?

Then use this code: import keyboard keyboard.sleep() READ MORE

Jan 4, 2021 in Python by Reshma
75,550 views
0 votes
2 answers

Deleting DataFrame row in Pandas based on column value

Pandas provide data analysts a way to ...READ MORE

Jan 4, 2021 in Python by Nikita
2,083 views