Ok, the light just went out.
I thought I was getting something, but no...
I will keep on reading, maybe it will hatch.
Maybe a different approach.
What is happening here?
(Should this be a new thread?)
import tkinter as tk
from tkinter import *
from tkinter import ttk
--
On 11/7/20 11:26 AM, Steve wrote:
Ok, I think I see a light in the fog.
It looks as if I can identify a variable to contain a library.
Import datetime as dt1
I guess that I can have a second variable containing that same library:
Import datetime as dt2
Should I presume that no
On 2020-11-07 10:51, Tim Chase wrote:
> from string import ascii_lowercase
> text = ",".join(ascii_lowercase)
> to_throw_away = 5
[derp]
For obvious reasons, these should be s/\/to_throw_away/g
To throw away the trailing N delimited portions:
> new_string = text.rsplit(',', n)[0]
new
On 2020-11-07 13:26:30 -0500, Steve wrote:
> Ok, I think I see a light in the fog.
>
> It looks as if I can identify a variable to contain a library.
>
> Import datetime as dt1
>
> I guess that I can have a second variable containing that same library:
>
> Import datetime as dt2
>
> Should I p
Hernán De Angelis wrote at 2020-11-6 21:54 +0100:
> ...
>However, the hard thing to do here is to get those only when
>tagC/note/title/string='value'. I was expecting to find a way of
>specifying a certain construction in square brackets, like
>[@string='value'] or [@/tagC/note/title/string='value'
Ok, I think I see a light in the fog.
It looks as if I can identify a variable to contain a library.
Import datetime as dt1
I guess that I can have a second variable containing that same library:
Import datetime as dt2
Should I presume that not doing this is what caused the interferen
On 2020-11-07 13:46, Bischoop wrote:
> text = "This is string, remove text after second comma, to be
> removed."
>
> k= (text.find(",")) #find "," in a string
> m = (text.find(",", k+1)) #Find second "," in a string
> new_string = text[:m]
>
> print(new_string)
How about:
new_string = text.r
Hi there,
I have been using multiple versions of Python on my laptop running Windows
10.
I installed 3.7.9 (64-bit) for my school work and 3.8.6 (64-bit) for my
personal usage.
*Build Number: 19041.572*
I had decided to uninstall both Python versions from my system as I wanted
to have a clean
Use .split() to split the string on the character and then use .join() to
rejoin the first 2 tokens
tokens = text.split(“,”)
new_string = “,”.join(tokens[:2])
On Sat, Nov 7, 2020, at 1:46 PM, Bischoop wrote:
>
>
> So I was training with slicing.
> Came to idea to remove text after second occu
>
>
> On Sat, Nov 7, 2020 at 8:51 AM Bischoop wrote:
>
>>
>>
>> So I was training with slicing.
>> Came to idea to remove text after second occurence of character, below
>> is how I've figured it out, I know if it works it good but how you
>> guys would made it in more pythonic way?
>>
>> text
So I was training with slicing.
Came to idea to remove text after second occurence of character, below
is how I've figured it out, I know if it works it good but how you
guys would made it in more pythonic way?
text = "This is string, remove text after second comma, to be removed."
k= (t
On 2020-11-07, Alexander Neilson wrote:
> Because the strip methods argument is the set of characters to remove from
> either end. So it checks from the ends character by character until it finds
> a character that isn’t in the set. Then it removes everything prior to that
> (or after that at e
On 2020-11-07, Frank Millman wrote:
> On 2020-11-07 1:28 PM, Frank Millman wrote:
>> On 2020-11-07 1:03 PM, Bischoop wrote:
>>>
> [...]
>>>
>>> another example:
>>>
>>> text = "this is text, there should be not commas, but as you see there
>>> are still"
>>> y = txt.strip(",")
>>> print(text)
>>>
No, it is XML metadata. I also believe there should be a better way using
[@...] expressions in the path.
H.
Den lör 7 nov. 2020 13:14Shaozhong SHI skrev:
> Hi, Hernan,
>
> Did you try to parse GML?
>
> Surely, there can be very concise and smart ways to do these things.
>
> Regards,
>
> David
Hi, Hernan,
Did you try to parse GML?
Surely, there can be very concise and smart ways to do these things.
Regards,
David
On Fri, 6 Nov 2020 at 20:57, Hernán De Angelis
wrote:
> Thank you Terry, Dan and Dieter for encouraging me to post here. I have
> already solved the problem albeit with a
On 2020-11-07 1:28 PM, Frank Millman wrote:
On 2020-11-07 1:03 PM, Bischoop wrote:
[...]
another example:
text = "this is text, there should be not commas, but as you see there
are still"
y = txt.strip(",")
print(text)
output:
this is text, there should be not commas, but as you see there
On 2020-11-07 1:03 PM, Bischoop wrote:
According to documentation strip method removes heading and trailing
characters.
Both are explained in the docs -
Why then:
txt = ",rrttggs...,..s,bananas...s.rrr"
x = txt.strip(",s.grt")
print(x)
output: banana
"The chars argument is not a p
Because the strip methods argument is the set of characters to remove from
either end. So it checks from the ends character by character until it finds a
character that isn’t in the set. Then it removes everything prior to that (or
after that at end of the string) and then returns the result.
According to documentation strip method removes heading and trailing
characters.
Why then:
txt = ",rrttggs...,..s,bananas...s.rrr"
x = txt.strip(",s.grt")
print(x)
output: banana
another example:
text = "this is text, there should be not commas, but as you see there
are still"
y = txt.
Hi,
Wikipedia has an article on the duodecimal system, that includes an
explanation of how to convert from decimal and the other way around.
https://en.wikipedia.org/wiki/Duodecimal?wprov=sfla1
Peerrhaps it can be easily implemented as a function. Good luck.
H.
Den lör 7 nov. 2020 07:55Nick
> On 7 Nov 2020, at 06:51, Nick Li wrote:
>
> Does anyone know how to turn a decimal number into duodecimal or if there is
> a function built-in for it?
I see lots of interesting answer in here:
https://stackoverflow.com/questions/2267362/how-to-convert-an-integer-to-a-string-in-any-base
21 matches
Mail list logo