move tag

9 questions


1 answers
198 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
159 views
0
How to erase only the first element in the list

[0, 1, 2, 3, 4] -> [1, 2, 3, 4]I'd like to remove the first element of the list together. Is there a function that does this?As I did, I don't think I need to use the for statement, but I don't kno...

2 years ago

1 answers
120 views
0
Remove list space

How do I get rid of the blanks on the list? Spaces have become list components, so how do I get rid of them all?Result value ['[', ', '\n', '\r', '', '\n', '\r', '', '', '\n', '\r', '', ', '\n', '\r',...

2 years ago

2 answers
149 views
0
Python coding, operation error (novice)

ex. [1,2,2,4,5]-> [2,2] // [1,4,4,4,6,8,8]->[4,4,4,8,8] // [1,2,3,4,5] ->[](Questionnaire: You are given a non-empty list of interiors (X). For this task, you should return a list consisting ...

2 years ago

1 answers
118 views
0
I want to move objects smoothly within a function, not update.

Within the Update function, you can move objects smoothly using Lerp and time.deltaTime. But I don't know how to implement it within the functions I define.using System.Collections;using System.Collec...

2 years ago

1 answers
97 views
0
What method should I use to move files?

source_files = '/PATH/TO/DIR1/*'destination_folder = '/PATH/TO/DIR2'When the source and destination are decided like that, I want to move the fileI looked up the os module, but there is no copy functi...

2 years ago

2 answers
95 views
0
Delete Python List Max String

It's PythonA = Delete the maximum string from the list ['c', 'bad', 'base', 'oracle', 'pandom'] (delete all strings of the same length if any) (ex. oracle and random) I know the maximum string and I k...

2 years ago

1 answers
135 views
0
os.remove()FileNotFoundError Error

Like #3, I learned that os.remove('file name') deletes it, but it says that there is no file or there is a type error.I want to know how to delete test1.txt as os.remove.test1txt is a file created in ...

2 years ago

1 answers
139 views
0
Python novice list - remove I have a question Peep ๐Ÿฅ๐Ÿค๐Ÿฃ

When you want to remove a common number in the lista = [1, 2, 1, 3, 1, 4, 1, 5, 1, 6, 1, 7]for remove_one in a: a.remove(1)print(a)[2, 3, 4, 5, 6, 7]All 1s are removed herea = [1, 2, 1, 1, 1, 1, 1, 1,...

2 years ago

ยฉ 2024 OneMinuteCode. All rights reserved.