Look at the ape package for instance. It'd be as simple as:
> library(ape)> tree <- read.tree(text ="(((A,B),(C,D)),E);")# or read.tree(file='path/to/file.tree') if using a file> tree$tip.label
[1]"A""B""C""D""E"
A similar approach in python:
python -c 'import sys; from ete3 import Tree; t = Tree(sys.argv[1]);print(t.get_leaf_names());' treefile.nwk
Then don't import it with copy and paste, read the file in directly. What I showed above was just an example of the functionality, you need to adapt it to what you are trying to do.
As for python, yes of course, ETE3 isn't a standard module - you need to install it.
I tried ape But the problem was importing the phylogenetic file it is too big for copy and paste and made error And I couldn't use it as import data
For python I got this error ete3 command not found
Then don't import it with copy and paste, read the file in directly. What I showed above was just an example of the functionality, you need to adapt it to what you are trying to do.
As for python, yes of course, ETE3 isn't a standard module - you need to install it.