Python Forum
Search Results
Post Author Forum Replies Views Posted [asc]
    Thread: Python script that deletes symbols in plain text
Post: RE: Python script that deletes symbols in plain te...

(Sep-05-2023, 03:52 PM)deanhystad Wrote: What operating system are you using Linux
nzcan General Coding Help 3 702 Sep-05-2023, 03:59 PM
    Thread: Python script that deletes symbols in plain text
Post: Python script that deletes symbols in plain text

I need a python script that deletes all symbols in a plain text file. For example, I want that all 'd', all 'f' and all '0' (zeros) in a plain text file to be deleted and not replaced by other symbols...
nzcan General Coding Help 3 702 Sep-05-2023, 03:46 PM
    Thread: How to change value in a nested dictionary?
Post: RE: How to change value in a nested dictionary?

(Sep-23-2019, 02:54 PM)ichabod801 Wrote: prime_dict['user-2']['limo'] = 15A way to think about it: prime_dict['user-2'] gives you the sub-dictionary {'appels': 2, 'babanas':7, 'limo':11, 'peaches': ...
nzcan General Coding Help 2 5,775 Sep-23-2019, 04:09 PM
    Thread: How to change value in a nested dictionary?
Post: How to change value in a nested dictionary?

I have a dictionary whose keys are strings and the values are other, nested dictionaries. The values ( nested dictionaries ) have different numbers of items. From 2 to 33. How can I change a certain ...
nzcan General Coding Help 2 5,775 Sep-23-2019, 02:21 PM
    Thread: some dict's special methods
Post: RE: some dict's special methods

Quote:As you can see it returns the built-in method dict.keys() does it means that behind every dict's built-in method stay one dict's special method?
nzcan Homework 5 3,178 Dec-18-2018, 05:02 PM
    Thread: some dict's special methods
Post: RE: some dict's special methods

and what operation executes dict's '__getattribute__' special method?
nzcan Homework 5 3,178 Dec-18-2018, 04:16 PM
    Thread: some dict's special methods
Post: some dict's special methods

hello, i suppose that behind the: >>> ca = {1:'koko', 2:'boko'} >>> 1 in ca True >>> 5 in ca False stays the dict's dunder '__contains__' but i am not so sure which duner ...
nzcan Homework 5 3,178 Dec-18-2018, 03:20 PM
    Thread: let's go 'verdana'!
Post: let's go 'verdana'!

hello, i was wondering would it be nice if the default font of the plain text in the topics was 'verdana'?
nzcan Board 1 2,493 Nov-01-2018, 06:08 PM
    Thread: a funny code
Post: a funny code

some funny code: >>> b = 'when we were nearly come to the last round of the punch, i addressed myself to randles.' >>> b = b.replace('e', 'o') >>> b 'whon wo woro noarly co...
nzcan Bar 0 2,132 Oct-31-2018, 08:51 PM
    Thread: global / local namespace
Post: global / local namespace

hello, recently i have 'discovered' a little bit 'strange' block of code. a = 5 print(id(a)) if a == 5: a = a + 2 print(a) print(id(a)) print(id(a)) the output: Output:10924160 7 10924224 1092422...
nzcan Homework 3 2,422 Oct-31-2018, 03:27 PM
    Thread: paths in django 'settings.py'
Post: paths in django 'settings.py'

in a new django-project in the file 'settings.py' we will find the first line of code: BASE_DIR = os.path.dirname(os.path.dirname(os.path.abspath(__file__))) the comment above this line of code say...
nzcan Web Scraping & Web Development 0 2,426 Oct-19-2018, 04:51 AM
    Thread: .remove() method in for-loop
Post: .remove() method in for-loop

it is clear what this code do: >>> sw = ['go', 'bo'] >>> for cm in sw: ... if cm == 'bo': ... sw.remove(cm) ... >>> sw ['go'] but when a list contains 4 'bo' items only...
nzcan Homework 7 4,402 Oct-08-2018, 07:39 PM
    Thread: Print Function
Post: RE: Print Function

answered
nzcan General Coding Help 4 3,065 Oct-06-2018, 08:54 AM
    Thread: text file processing
Post: RE: text file processing

i suppose the input should be the initial content of 'one.txt' and the output should be the processed content of the 'one.txt but with the changed content. meaning ... every sentence in 'one.txt' alre...
nzcan Homework 5 3,178 Sep-25-2018, 05:33 PM
    Thread: text file processing
Post: text file processing

hello, i have a 'one.txt'-file. 'one.txt' contains 11 sentences - plain text - utf-8 characters. i want to write a py-script that process 'one.txt' in such way, that every single sentence in 'one.t...
nzcan Homework 5 3,178 Sep-24-2018, 07:16 PM
    Thread: list of compliances of all special methods - examples
Post: list of compliances of all special methods - examp...

hello, we know that in the documentation of python3x all special methods of all data-types are listed in '3.3. Special method names'. but i was wondering is there in the internet a list of all ... com...
nzcan News and Discussions 2 2,772 Sep-01-2018, 12:15 PM
    Thread: call an instance of a class in the interactive
Post: RE: call an instance of a class in the interactive

(Aug-23-2018, 06:37 AM)Gribouillis Wrote: If you only want to call the instance, you simply do >>> user1()However, being callable is an uncommon feature for a class representing a user. In ...
nzcan Homework 3 2,964 Aug-23-2018, 10:47 AM
    Thread: call an instance of a class in the interactive
Post: call an instance of a class in the interactive

hello, I have created a class 'User': class User: def __init__(self, name, gender, age): self.name = name self.gender = gender self.age = age ...
nzcan Homework 3 2,964 Aug-23-2018, 05:54 AM
    Thread: Python3 No Module Named gi, Tkinter, setuptools and more... On Fedora Linux
Post: RE: Python3 No Module Named gi, Tkinter, setuptool...

Quote:tkinter is Tkinter (capital 'T') on python 3 after starting python3.6.1 in the interactive mode of the linux-shell interpreter i have also tried: >>>'import Tkinter' the result: Output...
nzcan General Coding Help 12 14,105 Aug-10-2018, 05:23 PM
    Thread: container data type formatting
Post: RE: container data type formatting

i found the solution of this task, but it is pretty unexpected and complicated!
nzcan Homework 5 3,799 Aug-10-2018, 05:06 PM

User Panel Messages

Announcements
Announcement #1 8/1/2020
Announcement #2 8/2/2020
Announcement #3 8/6/2020