What are the differences between these clauses?
1.I learned English for 2 years.
2. I learned English in 2 years.
3. I have learned English for 2 years.
4. I have learned English in 2 years.
What are the differences between these clauses?
1.I learned English for 2 years.
2. I learned English in 2 years.
3. I have learned English for 2 years.
4. I have learned English in 2 years.
They could be slightly modified to make some sense
1 I learned English for 2 years
this would sound fine if followed by another phrase
I learned English for 2 years but then I stopped
2 I learned English in 2 years
This would make some sense if it referred to some standard
I learned English to level B2 in 2 years
The other two are more problematic
3 I have learned English for 2 years
This is incorrect, I have been learning English for 2 years might work well.
4 I have learned English in 2 years
This sounds quite odd and I cannot think of a simple modification to make it meaningful.
Learn is problematic. I recommend using study. The difference between learn and study is that you can control which courses you take (study) and for how long, but you cannot control how well or when you internalize the topics you studied.
"I studied topic X for 2 years (as a teen)" means that you have stopped and are not doing it now. "For" is correct because you specify a duration and not a location. "I studied in Barcelona for 2 years", "I studied arts for 2 years"
"I have studied topic X for 2 years" imply that you continue to do so now.
If you really wish to state that you learned some skills in a topic as an achievement, you can say "I learned how to play golf like a pro in 2 years" or "I learned how to speak English like a native in 2 years". As mentioned by mdewey, this sentence makes more sense if you specify the achievement by a reference to some standard. In this case, "in" is correct because you did it (made the achievement) within the mentioned deadline.