python tag

Python is a high-level, interpreted, general-purpose programming language. Its design philosophy emphasizes code readability with the use of significant indentation.

Python is dynamically-typed and garbage-collected. It supports multiple programming paradigms, including structured (particularly procedural), object-oriented and functional programming. It is often described as a "batteries included" language due to its comprehensive standard library.

Guido van Rossum began working on Python in the late 1980s as a successor to the ABC programming language and first released it in 1991 as Python 0.9.0. Python 2.0 was released in 2000 and introduced new features such as list comprehensions, cycle-detecting garbage collection, reference counting, and Unicode support. Python 3.0, released in 2008, was a major revision that is not completely backward-compatible with earlier versions. Python 2 was discontinued with version 2.7.18 in 2020.

Python consistently ranks as one of the most popular programming languages. It is used by many organizations and companies. Pixar, Disney, Instagram and the developers of the Linux Kernel are among many of it's high-profile users, which includes many developers of Free and Open source software.

Reference: WIKIPEDIA

4650 questions


1 answers
74 views
0
To divide two integers and save them as prime numbers?

I thought 0.5 would come out if I said 1/2, but 0 came outIf you divide two integers, you just cut off the decimal pointWhen a and b are int c = a/bHow do we get c to float as a result?a = 1b = 2print...


1 answers
92 views
0
Counting Characters in a String

I'd like to count how many specific characters appear in the string.What's the easiest way?ex)mystring = aaabccWhen a->3b->1c->2

2 years ago

1 answers
129 views
0
To output variables & properties for an object

Does Python have a function like print_r of PHP?I have to see the status of the object when I debug it.Is there a similar function?


1 answers
185 views
0
How do I erase the elements of Dict instead of pop?

You are about to erase the element of dict from Python.I know how to erase it with dict.pop()pop() returns elements that are deleted, right?I'd like to get the disc with the elements removed back.The ...

2 years ago

1 answers
81 views
0
To return one or more values in a function

What kind of method do you use to return multiple values in a function?The method I'm using is as follows.def f(x): y0 = x + 1 y1 = x * 3 y2 = y0 ** y3 return (y0,y1,y2)When there are more elements, i...


1 answers
104 views
0
How do I check the file size?

We are working on Python code in the window environment.Depending on the size of the file, I'm working on a different code (such as writing an e-mail if it's over 100 kb)I can do everything else, but ...

2 years ago

1 answers
113 views
0
To combine two dicts with overlapping keys

If there are overlapping keys when combining two dict, I would like to add a value corresponding to the key.For example, if you have the following A and BDict A: {'a':1, 'b':2, 'c':3}Dict B: {'b':3, '...

2 years ago

1 answers
164 views
0
To find out if a variable is a function or not?

How do I find out if the variable x is a function or just a general variable?When x is pointing to a function,type(x) = <type 'function'> I want to winisinstance(x, function)I wrote it like this...

2 years ago

1 answers
30 views
0
How do I create a "cd" command function with Python?

I'm making a program to draw and save pictures with Python.It's not where the script ranI want to save it somewhere else. Like cd in the shellHow do I change the directory I'm working on?

2 years ago

1 answers
107 views
0
Is there no const constant keyword in Python?

How do I specify variables as constants in Python?In Java,public static final String CONST_NAME = Name;I wrote it the same wayConst, Const CONST, Final, Final, Final, and Final are all not allowed in ...

2 years ago
« - 197 - »

© 2024 OneMinuteCode. All rights reserved.