Question: ```
*In android Edittext, i have set drawable left and right, i can make
click actions for drawable left and right but i cant check single
click and double click for it.*

**Multiple actions:**

```

1.left drawable click
 2.right drawable click
 3.single click 
 4.Double click 
 5.Clear text

Answer: 
For the 2nd approach is the simplest, I'll stick to it.

You stated the contents of `dev.txt` to be Norwegian, that means, it will include non-ascii characters like `Æ,Ø,Å` etc. The python interpreter is trying to tell you this:

`UnicodeDecodeError: 'ascii' codec can't decode byte 0xc3 in position 26: ordinal not in range(128)` It cannot interpret the byte `0xC3 = 195 (decimal)` as an ascii character, which is limited to a range of 128 different characters. 

I'll assume you're using UTF-8 as encoding but if not, change the parameter in line 2.

```
# -*- coding: utf-8 -*-

fr = open('dev.txt', 'r', encoding='utf-8')
text = fr.read()
print(text)

```

If you do not know your encoding, you can find it out via your editor or [use python to guess it](https://stackoverflow.com/a/11087170/5124673).

Your **terminal could also cause the error** when it's not configured to print Unicode Characters or map them correctly. You might want to take a look at [this question and its answers.](https://stackoverflow.com/q/10561923/5124673)

---

After operating a file, it is recommended to close it. You can either do that manually via `fr.close()` or make python do it automatically:

```
with open('dev.txt', 'r', encoding='utf-8') as fr:
    # automatically closes fr when leaving this code-block

```
For example: 

```
open ("fileA.txt", "r") as fileA:
    for line in fileA:
        print(line);

```