Questions tagged as 'python-3.x'

3
answers

How do I display the "Press ENTER to continue" in Python 3.4?

I wanted to know how to do the " Press ENTER to continue", or the " Press any key to continue " in Python 3.4 without having to create a variable just to store the ENTER.     
asked by 18.06.2015 / 04:18
1
answer

Count of a specific character in a word in Python 3 [duplicate]

I recently asked a similar question, but received answers where my entry was supposed to be a number. Can you count how many specific characters you have in a word? As in "example" it has "2 and".     
asked by 16.12.2017 / 15:06
1
answer

Login on facebook with python

I would like, for educational reasons, to log into facebook with a python script. I tried the requests import requests s = requests.Session() post_url = 'https://www.facebook.com/login.php?login_attempt=1&lwv=110' headers = {"User-agen...
asked by 26.07.2016 / 21:51
2
answers

How to Direct Commands to Linux Terminal with Python

I need to create a script in Phyton that when run either by mouse click or 'enter' the keyboard, it opens the Linux terminal itself and executes any command inside it. I've already been able to get it to run the command, but as long as the scrip...
asked by 17.08.2014 / 21:42
1
answer

Understanding the pythonic way of dealing with properties

I'm trying to figure out how this python properties issue works. But the problem is that in all the net tutorials out there I only find the damn example with only one attribute. I'm looking for an example where you have more to do with day to da...
asked by 01.07.2015 / 01:56
2
answers

Threads in python 3.4

Well, I'm having a hard time using threads, I need to do the following: I have several items to compare with a variable, but this comparison takes a while, so I would like to make several comparisons at the same time and if some comparison is...
asked by 15.04.2015 / 16:51
2
answers

What's the difference between namedtuple and NamedTuple?

The module documentation typing states that the two code snippets below are equivalent. Using typing.NamedTuple : from typing import NamedTuple class Employee(NamedTuple): name: str id: int Using collections.na...
asked by 08.06.2018 / 20:32
5
answers

How to check if the string variable value is number?

I am developing a program where the user types a data, then I have to check if the value is number to proceed with the operation, but if it enters a non-numeric value it is alerted about the invalid value. > I tried to use the type() fu...
asked by 03.06.2017 / 21:07
1
answer

Retrieving list list values in python

I've tried several things and still can not figure out what the problem with my code is, it's a simple code. With numpy I put the txt values in the arrays array and I want to make some copies for two other lists, mensagem and no ....
asked by 22.09.2015 / 19:05
6
answers

how to search for an element in a list that is within another list?

   I have the following list of lists. [['julian', '0', '5'], ['ana', '10', '4']]    I need to use a function that tells me the position of any element within that list, I tried to use: elemento = lista.index('julian') print (elemento)...
asked by 05.06.2017 / 08:55