This is my blocks, I am trying from yesterday to reduce this block but i am unable to do. can anyone help me
thanks
Yes it can be reduced.
I don’t have system so I can’t show blocks.
But I will try to explain.
-
Create two lists
Eg : list1 = list from CSV (a,b,c,d…) and other list for other font -
Use for loop
Or use Dictionaries
Yes that will be a better way
You can use dictionary and use replace text mappings.
I am not familairy with dictionary block. can you plz show blocks.
A Dictionary is basically a list of key and value pairs. You can use it to make a mapping of the characters to its replacement. If you know JSON, it is similar to Objects.
https://docs.kodular.io/blocks/dictionaries/
Here’s an example of using Dictionaries for character mapping which is exactly what you are looking for: Chars exchanges. Dictionary. Json to csv. Transliteration - Tutorials and Guides - MIT App Inventor Community
Show your blocks
this is my block according to your suggestion
And if you want to simplify:
First make this dictionary, then press Do it.
Copy the result
Use that this extension to convert the copied text to dictionary
Delete all dictionary blocks.
Do the same as my previous post to replace text
Well @WatermelonIce already gave you block.
But if you are using for then you have to use
For I in list : your list
Replace item I
With item in list2
index: of i in list 1
Here is a little example
Thanks for helping me , but can you help me without using Dictionary blocks
For I in list
what you mean by For I in list
There is a block in list category
For item in list
but can you help me without using Dictionary blocks
Why?
And if you want to simplify:
First make this dictionary, then press Do it.
[image]
Copy the result
[image]
Use that this extension to convert the copied text to dictionary
[image]
Do the same as my previous post to replace text
This uses the dictionary blocks, but after all the dictionary blocks is not needed