Posts by Sevila • 129 points
6 posts
-
-1
votes1
answer77
viewsQ: String methods - isdigit and isdecimal
The method 'str'.isdigit() will always return the same T/F as isdecimal() or there is some difference in the algorithm of these methods?
-
1
votes2
answers258
viewsQ: if statement - use of parentheses
Using parentheses with if, alters code performance or modifies something? Example, this: if (1 != 2): print('É True') compared to: if 1 != 2: print('É True') If it is only aesthetic, which form is…
-
2
votes1
answer2089
viewsQ: ALTER TABLE changing column name
When using ALTER TABLE to modify the column name in a table, we need to define the data type again: ALTER TABLE tabela CHANGE COLUMN nome_antigo novo_nome tipo_dados; If the data type is not…
-
2
votes1
answer771
viewsQ: Add shortcut to command in notebook jupyter
Hello, there is a way to add a hot key to the command: -Restart kernel & clean output No need to run the code every time you open the notebook jupyter.
ipython-notebookasked Sevila 129 -
2
votes2
answers218
viewsQ: See how native functions were written - Python
There is a practical way to check, how is written the code of any Python function, example max()?
-
4
votes3
answers16658
viewsQ: How to round up with Python?
Is there a native Python way to top up? Example: 10/3 resulting 4. What I’m wearing now is a parole: x=10 if x % 3 != 0: x += 1 But that’s not very practical.…