Edited for clarity I need to be able to copy and paste a windows path directly from file explorer into a function which turns it into a pathlib.WindowsPath() ob
I'd like to remove any string that ends in either of 2 characters in a pipe. In this example it's ".o" or ".t". Some of them get removed, but not all of them, a
Is there any way to retrieve an array of words prefixed with @ sign in a string? "@City == xyz AND @Hobby == gardening" -> ["@City","@Hobby"] I tried below
Example For picture = ["abc", "ded"] the output should be addBorder(picture) = ["*****", "*abc*", "*ded*
I am new to coding, trying to find a simple python code for re-arranging some lines. Lines have specific string to select. Those lines with this specific string
Is it possible using sed to replace the first occurrence of a character or substring in line of file only if it is the first 2 characters in the line? For examp
I want to get left value (LD) pipe separated value from the DataFrame column "'CA Distance Nominal (LD | au)" here is the code. when I convert the string to flo
I have a list of names of apple products in random format. like take a single product name iphone 11 pro which can be found Iphone 11 Pro or iphone 11 Pro, or a
I have an exercise to find the most common letter in a string, excluding punctuation symbols, digits and whitespaces and the result should be in lowercase "A"==
What I want my code to do I want my code to validate user input without using Regex or isDigit operators. If all the requirements of the if statements are found
s ="XII" roman = {"I":1, "IV":4, "V":5, "IX":9, "X":10, "XL":40, "L":50, "XC":90, "C":100, "CD":400, "D":500, "CM":900, "M":1000} out = 0 n =
I have a datframe >temp Age Rank PhoneNumber State City 10 1 99-22344-1 Ga abc 15 12 No Ma xyz For the column(Phone Numbe
How would you go about removing everything after x number of characters? For example, cut everything after 15 characters and add ... to it. This is an example s
After loading lots of xlsx sheets of multiple workbooks, I want to create a double check of the tidiness and cleanliness of the data source. I created a data fr
So I'm asked to do this query for a college project: SELECT l.city AS name, AVG((pr.ap_price::double precision * 7 - pr.weekly::doub
I have this dataframe (ID is a string and Value a float): ID Value 1 0.0 1.1 0.0 1.2 0.0 1.2.1 2750
I have to allow my users to make an update with 24 hours of delay from their previous update, so because date operations in this case are going to be on the bac
let code = document.querySelector('.Nform').innerHTML; localStorage.setItem('code',JSON.stringify(code)); let finalCode = code.replace(/ <p class="removeElem
I want to print out data from a Class instance. I tried including data in str function, but this only works when value is at its default (an empty list). After
I have a homework that requires me to do operations on a string, I used an iterator in the second function to find the last index of a letter in the string and