256 Kilobytes

Answers > Python

Type AnswersAsk and answer questions, if that is something that you want to do. Category All Tag Python

Profile Photo - Some Guy
Profile Photo - Univa

Last Reply A simple case that generates this error message: In [8]: [1,2,3,4,5][np.array([1])] --------------------------------------------------------------... Univa,

A simple case that genera...

Sat, 01 Jun 2019 09:14:49 -0700 1 month ago
🗨
1
🐏
0
👁
146
Profile Photo - Some Guy
Profile Photo - Univa

Last Reply Run print(os.environ['PATH']) in the system terminal using the same interpreter Copy the result and add as a PATH environment variable to your Ru... Univa,

Sun, 05 May 2019 03:19:56 -0700 2 months ago
🗨
1
🐏
0
👁
166
Profile Photo - Some Guy
Profile Photo - Univa

Last Reply Typeerror This Constructor Takes No Arguments Python Error error codes are caused, in one way or another, by misconfigured system files in your Window... Univa,

Typeerror This Constructo...

Fri, 26 Apr 2019 08:18:20 -0700 2 months ago
🗨
1
🐏
0
👁
138
Profile Photo - Some Guy
Profile Photo - Univa

Last Reply Before posting any codes try using the formatting tools, sometimes it solves the problem.  You can also try pasting this code:  a_str,... Univa,

Before posting any codes...

Sun, 14 Apr 2019 03:06:36 -0700 3 months ago
🗨
1
🐏
0
👁
185
Profile Photo - Some Guy

[Python] Fix for "TypeError: 'bool' object is not iterable?"

Answers in Scripting and Automation | By Some Guy

Published 6 months agoSun, 13 Jan 2019 05:39:20 -0800

Profile Photo - August R. Garcia

Last Reply You probably have your code set up where some value can either be: An array (or whatever) or FALSE (for when there are no values) Th... August R. Garcia,

You probably have your&nb...

Sun, 07 Apr 2019 12:14:43 -0700 3 months ago
🗨
1
🐏
0
👁
543
Profile Photo - Some Guy
Profile Photo - Graln_of_Truth

Last Reply It will usually taking 3 months before you get to the point where you can do everything on your own without having to get support from others. Also Se... Graln_of_Truth,

It will usually taking 3...

Sat, 30 Mar 2019 16:09:52 -0700 3 months ago
🗨
1
🐏
0
👁
138
Profile Photo - K. Crezcheezy

[Python] How do global variables work?

Answers in Computer Programming | By K. Crezcheezy

Published 3 months agoTue, 19 Mar 2019 22:44:13 -0700

Profile Photo - KacssPL

Last Reply Basically a global variable is defined and declared outside a function and needed to be used inside of a function. For a good example on how this work... KacssPL,

Basically a global variab...

Sat, 30 Mar 2019 15:57:01 -0700 3 months ago
🗨
1
🐏
0
👁
87
Profile Photo - Some Guy

How to install NumPy on Windows 10?

Answers in Technology | By Some Guy

Published 5 months agoWed, 06 Feb 2019 16:17:32 -0800

Profile Photo - Zhaybib

Last Reply Since you want to install NumPy on Windows 10, I suggest that you watch this video from YouTube to get an idea of how to install https://www.youtube.c... Zhaybib,

Since you want to install...

Sat, 30 Mar 2019 15:56:01 -0700 3 months ago
🗨
1
🐏
0
👁
115
Profile Photo - Some Guy

Python floor division: Difference between '/' and '//' ?

Answers in Computer Programming | By Some Guy

Published 5 months agoWed, 06 Feb 2019 13:49:08 -0800

Profile Photo - Zhaybib

Last Reply For python floor division questions, I recommend that you check out Stack Overflow, as there are many answers such as this one, https://stackoverflow.... Zhaybib,

For python floor division...

Sat, 30 Mar 2019 15:25:48 -0700 3 months ago
🗨
1
🐏
0
👁
105
Profile Photo - chkdf8

What are some good Python interview questions?

Answers in Local and Offline Businesses | By chkdf8

Published 3 months agoTue, 19 Mar 2019 11:15:11 -0700

Profile Photo - __wesistdas

Last Reply 1.What is the difference between list and tuples? 2.What are the key features of Python? 3.What is the difference between deep and shallow copy? 4.How... __wesistdas,

1.What is the difference...

Sat, 30 Mar 2019 15:05:05 -0700 3 months ago
🗨
1
🐏
0
👁
103
Profile Photo - Some Guy

How to clear the screen in Python?

Answers in Computer Programming | By Some Guy

Published 5 months agoWed, 06 Feb 2019 16:18:12 -0800

Profile Photo - SiteIessVagrant

Last Reply I do not know how to do this. I have not had much experience with python and coding. SiteIessVagrant,

I do not know how to do t...

Sat, 30 Mar 2019 14:48:00 -0700 3 months ago
🗨
1
🐏
0
👁
147
Profile Photo - Edgelady43069

R vs. Python for data science?

Answers in Computer Programming | By Edgelady43069

Published 3 months agoTue, 19 Mar 2019 14:26:39 -0700

Profile Photo - -alxl_

Last Reply Short version - R is probably better for short term project. Long term learning Python may open more doors. R is nice because there are a lot of prema... -alxl_,

Short version - R is prob...

Sat, 30 Mar 2019 14:27:59 -0700 3 months ago
🗨
1
🐏
0
👁
72
Profile Photo - Some Guy

Urllib.error.httperror: http error 403: forbidden?

Answers in Computer Software | By Some Guy

Published 5 months agoWed, 06 Feb 2019 14:18:41 -0800

Profile Photo - Graln_of_Truth

Last Reply It would appear you're trying to open up a document that leads to a link on thepiratebay that is facing an error with Python 3. More information regar... Graln_of_Truth,

It would appear you're tr...

Sat, 30 Mar 2019 14:26:40 -0700 3 months ago
🗨
1
🐏
0
👁
116
Profile Photo - Some Guy
Profile Photo - masshoIe3

Last Reply Range () returns the values in a limited list, and is an iterable. Xrange is a generator. Xrange can handle a huge list and uses the process of 'yield... masshoIe3,

Range () returns the valu...

Sat, 30 Mar 2019 14:25:29 -0700 3 months ago
🗨
1
🐏
0
👁
100
Profile Photo - Some Guy

Write() argument must be str, not bytes?

Answers in Computer Software | By Some Guy

Published 5 months agoWed, 06 Feb 2019 14:19:21 -0800

Profile Photo - -alxl_

Last Reply When working with data it can be encoded in text (string/characters) or bytes (binary). You may need to convert from binary to strings so it is readab... -alxl_,

When working with data it...

Sat, 30 Mar 2019 13:56:41 -0700 3 months ago
🗨
1
🐏
0
👁
86
Profile Photo - Some Guy

How to print without a newline in Python?

Answers in Scripting and Automation | By Some Guy

Published 5 months agoWed, 06 Feb 2019 13:47:28 -0800

Profile Photo - Zhaybib

Last Reply Since you say that you are curious as to how to print without a newline in Python, I suggest that you look here, https://stackoverflow.com/questions/4... Zhaybib,

Since you say that you ar...

Sat, 30 Mar 2019 13:39:40 -0700 3 months ago
🗨
1
🐏
0
👁
80
Profile Photo - Edgelady43069

[Python] How to unpack a tuple?

Answers in Computer Programming | By Edgelady43069

Published 3 months agoTue, 19 Mar 2019 05:06:14 -0700

Profile Photo - Zhaybib

Last Reply When you are learning Python, you will learn about how to unpack a tuple. The way to unpack a tuple is to follow the steps that are outlined in this w... Zhaybib,

When you are learning Pyt...

Thu, 21 Mar 2019 00:52:27 -0700 3 months ago
🗨
1
🐏
0
👁
93
Profile Photo - Your Dad
Profile Photo - Edgelady43069

Last Reply Selenium actually supports Python. There are many questions that may be asked, but understanding how they work together is the first topic you should... Edgelady43069,

Selenium actually support...

Thu, 21 Mar 2019 00:20:40 -0700 3 months ago
🗨
1
🐏
0
👁
76
Profile Photo - Edgelady43069

Solving the error "Invalid literal for int() with base 10"?

Answers in Computer Programming | By Edgelady43069

Published 3 months agoTue, 19 Mar 2019 04:31:47 -0700

Profile Photo - Zhaybib

Last Reply When you are working in computer programming and need help solving the error of invalid literal for int() with base 10, you can get that information r... Zhaybib,

When you are working in c...

Wed, 20 Mar 2019 20:06:27 -0700 3 months ago
🗨
1
🐏
0
👁
84
Profile Photo - Some Guy
Profile Photo - roxblade

Last Reply Pickle protocol can be simply referred to as the file format. The higher the protocol is, the more recent version of python is what you need to read t... roxblade,

Pickle protocol can be si...

Wed, 27 Feb 2019 13:31:12 -0800 4 months ago
🗨
1
🐏
0
👁
689
Profile Photo - Some Guy

How to add Anaconda to path on Windows?

Answers in Computer Software | By Some Guy

Published 5 months agoWed, 06 Feb 2019 14:16:51 -0800

Profile Photo - roxblade

Last Reply Check out this Stack Overflow thread for potential answers. There are a number of problems that make Python throw up this error. roxblade,

Check out this Stack Over...

Sat, 23 Feb 2019 11:49:01 -0800 4 months ago
🗨
1
🐏
0
👁
116
Profile Photo - Some Guy

Taberror: inconsistent use of tabs and spaces in indentation?

Answers in Web Development | By Some Guy

Published 5 months agoWed, 06 Feb 2019 14:15:21 -0800

Profile Photo - roxblade

Last Reply Simply replace all tabs with 4 spaces. Use the Find and Replace feature. Use a better text editor if yours doesn't support Find and Replace. Do not us... roxblade,

Simply replace all tabs w...

Sat, 23 Feb 2019 11:21:54 -0800 4 months ago
🗨
1
🐏
0
👁
132
Profile Photo - Some Guy
Profile Photo - Hash Brown

Last Reply Hello, You're trying to decode a JSON string by the sound of it. The most common errors for these sorts of things are: The JSON string is not... Hash Brown,

Hello,

Thu, 21 Feb 2019 14:37:41 -0800 4 months ago
🗨
1
🐏
0
👁
155
Profile Photo - Some Guy
Profile Photo - Hash Brown

Last Reply >Can you find me a forum entry on a coding site that deals with fixing this exact type error? k. These errors are ususally created when you c... Hash Brown,

>Can you find me a for...

Wed, 20 Feb 2019 06:09:44 -0800 4 months ago
🗨
1
🐏
0
👁
796
Profile Photo - Some Guy
Profile Photo - Hash Brown

Last Reply Python 3 docs say: "Construct an iterator from those elements of iterable for which function returns true." Source: https://docs.python... Hash Brown,

Python 3 docs say:

Wed, 20 Feb 2019 04:39:57 -0800 4 months ago
🗨
1
🐏
0
👁
292
Profile Photo - Some Guy
Profile Photo - Hash Brown

Last Reply Hey, So NaN values (not a number) are normally used when values are likely to be so large they don't fit into a standard double. for example if... Hash Brown,

Hey,

Wed, 20 Feb 2019 04:20:31 -0800 4 months ago
🗨
1
🐏
0
👁
2,404
Profile Photo - Some Guy
Profile Photo - Hash Brown

Last Reply Hello dude, len() gets the length of a string. The data passed to it has to be a string, that's just how it works. So if you're trying to pass a... Hash Brown,

Hello dude,

Wed, 20 Feb 2019 03:40:58 -0800 4 months ago
🗨
1
🐏
0
👁
167
Profile Photo - Some Guy

How to round up in Python?

Answers in Computer Programming | By Some Guy

Published 5 months agoWed, 06 Feb 2019 15:53:30 -0800

Profile Photo - roxblade

Last Reply The ceil function is quite useful. Import the math library and issue the following code:print(math.ceil(6.3)) and it will be rounded off to 6.There ar... roxblade,

The ceil function is quit...

Thu, 14 Feb 2019 23:41:39 -0800 5 months ago
🗨
1
🐏
0
👁
121
Profile Photo - Some Guy

Solve "Typeerror: unhashable type: 'list'"?

Answers in Scripting and Automation | By Some Guy

Published 7 months agoSun, 16 Dec 2018 09:34:42 -0800

Profile Photo - Default

Last Reply The hash() is a built-in python method, used to return a unique number . This can be applied to any user-defined object which won’t get changed... aldrinjohn,

The hash() is a built-in...

Mon, 11 Feb 2019 02:35:23 -0800 5 months ago
🗨
1
🐏
0
👁
254
Profile Photo - Some Guy
Profile Photo - roxblade

Last Reply You're trying to change a part of a string. That isn't supported by many object-oriented programming languages. Unicode objects like * are used to cha... roxblade,

You're trying to change a...

Thu, 07 Feb 2019 02:52:20 -0800 5 months ago
🗨
1
🐏
0
👁
192