Bỏ qua để đến Nội dung
Menu
Câu hỏi này đã bị gắn cờ
2 Trả lời
2822 Lượt xem

Hi everyone, I have a problem with code.

In this part:

qty_position = scan_barcode.find('-')

I need replace symbol - with symbol

qty_position = scan_barcode.find(''')

the problem is that with this new symbol, code after change like if is it:

""" Text """

How I can do?

Thanks very much

Ảnh đại diện
Huỷ bỏ
Tác giả Câu trả lời hay nhất

Thanks Hassan, it work!

Can I ask an other question, If I need:

qty_position = scan_barcode.find("'" or "*")

it's possible to do this? What's the correct code?

Thanks

Ảnh đại diện
Huỷ bỏ

qty_position = scan_barcode.replace("'", "").replace("*","")

Can you make my answer as solved?

Tác giả

Hi Hassan, thanks for you help! I would like make your answer as solved, but I can not because forum need 5 Karma for make it, and I have not its. I don't know how I can do

Câu trả lời hay nhất
qty_position = scan_barcode.replace("-", "'")
Ảnh đại diện
Huỷ bỏ
Bài viết liên quan Trả lời Lượt xem Hoạt động
2
thg 9 24
1417
2
thg 8 25
2210
1
thg 7 25
752
1
thg 8 25
1150
0
thg 5 25
1260