string tag

223 questions


1 answers
133 views
0
How do I change a string like "0/0" to a date form?

I'd like to change strings such as January 20th to a date form, but I think it'll be difficult to use strptime() because the form has no zeros in front of it like July 4th.Can't we simply change strin...


1 answers
97 views
0
I want to assign multiple strings to one variable, but I get an error. - - JavaScript

const arr = ['a', 'b', 'c', 'd', 'e']; var x = b || d || g || h || z; const the_number_of_x = arr.filter(i => i === x).length; if (the_number_of_x === 2) { console.log(success!) } } else { consol...


2 answers
87 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
56 views
0
String Specific Character Removal Function

#include<stdio.h>#include<ctype.h>#define size 100int main(){ char s[size] = Applea; char c = ; c = getchar(); int i, j; int n = 100; for (i = 0; i < n; i++) { if (s[i] == (char)c) { ...

2 years ago

2 answers
61 views
0
Converting Python strings to variable names

Hello. ^^I was making a programSelf the string delivered as a factor.Can we replace it with a variable?I'm asking this question because I'mFor example, this is the case.def a(self, string) : self.stri...

2 years ago

1 answers
76 views
0
Replace string case using Python for statement

In Python, it says that to change the case of a string using the for statement, it should be the code below, but I don't know why it should be specified as new_text = str()!text = input('English case ...

2 years ago

1 answers
136 views
0
Python [::] What do you call this?

If you use a string or array in Python, a = '123456789'print(a[::])#Output: 123456789There are times when [::] calls are used as above. What do you call this function?

2 years ago

2 answers
111 views
0
How to eliminate spacing due to Python print ','

a = input()print(a[:2],shprint(a[3:]Minutes)It comes out like this because I used and but how do I print out without spacing?(I want to minimize the running time!))

2 years ago

1 answers
86 views
0
I would like to ask you to extract only the English part of the Python string.

Hi, everyone. I'd like to extract a specific string with Python.I want to extract only the English part.Question number 1 (only the English part changes, and the rest are all the same structure.) [Inf...

2 years ago

1 answers
139 views
0
Python replace, I have a question!

b=2A= Oh, I really want to eat 'crunchy' \jeon\.B=A[5:9]C=B.replace(B), 'Brown'C=C.replace(B),'Yellow',b)print(C)When you print out a C, 'Yellow' 'Yellow' Shouldn't it come out as? I'm asking because ...

« - 22 - »

© 2024 OneMinuteCode. All rights reserved.